Closed
Description
Describe the bug
Just like the Vite docs, I use custom styles in the index.md
file using <style module>
. I also use custom components in which I use <style scoped>
.
Since I updated from version 1.0.0
to the latest one (the one in the StackBlitz), the built page's styles are broken. In the dev preview everything looks like expected.
Reproduction
Open the StackBlitz Demo with this link.
If it does not run automatically, run npm install && npm run dev
. It should look something like this:
Then run npm run docs:build && npm run docs:preview
and it will look like this:
As you can see, the hero image and its background are different and the cards are different as well.
Expected behavior
I expected the built version to look just like the dev preview (or at least very close).
System Info
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics
Memory: 6.45 GB / 15.35 GB
Binaries:
Node: 21.2.0 - C:\Program Files\nodejs\node.EXE
npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.1.2 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
npmPackages:
vitepress: ^1.3.1 => 1.3.1
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.