Closed nmchgx closed 2 years ago
Hi! :) I am sorry this is happening. I will look into this hopefully today or tomorrow! I will let you know!
I have looked into it and could not reproduce with my setup... The only thing that is different from yours is my build command:
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
},
Is there a reason why you are running tsc before vite build? I think vite is supposed to handle typescript for you.
The build is successful! Thank you for your timely reply. I think the reason is the vite version.
Before
vite v2.4.3 building for production...
✓ 189 modules transformed.
Could not load /code/client/src/components/top-nav/styles/index.scoped.less?scope=b8709f7c (imported by src/components/top-nav/index.tsx): ENOENT: no such file or directory, open '/code/client/src/components/top-nav/styles/index.scoped.less?scope=b8709f7c'
error during build:
Error: Could not load /code/client/src/components/top-nav/styles/index.scoped.less?scope=b8709f7c (imported by src/components/top-nav/index.tsx): ENOENT: no such file or directory, open '/code/client/src/components/top-nav/styles/index.scoped.less?scope=b8709f7c'
error Command failed with exit code 1.
After
vite v2.7.13 building for production...
✓ 1719 modules transformed.
dist/index.html 6.00 KiB
dist/assets/index.ae41ccc4.css 5.83 KiB / gzip: 1.36 KiB
dist/assets/index.9d2dad9a.js 22.04 KiB / gzip: 6.40 KiB
dist/assets/vendor.da5dbdfa.js 1690.96 KiB / gzip: 414.89 KiB
Ah sweet 👍 Thank you!
Hello, I can use the plugin to run
vite
, but cannot runvite build
.I hope to get your help.Error
vite.config.ts
package.json