Vite-SSG cannot build element-plus CSS
See original GitHub issueDescription
Vite-SSG cannot build element-plus CSS
Reproduce
- Example source: https://github.com/8bu/vite-ssg-error-element-plus
- Step to reproduce: Run
pnpm build
- Error:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for \\vite-ssg-error-element-plus\node_modules\.pnpm\element-plus@2.1.10_vue@3.2.33\node_modules\element-plus\theme-chalk\el-footer.css
at new NodeError (node:internal/errors:371:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:87:11)
at defaultGetFormat (node:internal/modules/esm/get_format:102:38)
at defaultLoad (node:internal/modules/esm/load:21:14)
at ESMLoader.load (node:internal/modules/esm/loader:359:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:280:58)
at new ModuleJob (node:internal/modules/esm/module_job:66:26)
at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:297:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:261:34)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:81:21) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
ELIFECYCLE Command failed with exit code 1.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9
Top Results From Across the Web
When I import element-plus,vite will not be reload #620 - GitHub
Well, after many try I found that vite-plugin-style-import causing the problem, so for the temporary solution, I manually import the component & css...
Read more >Configuring Vitest
If you want to have a different configuration for testing or your main app doesn't rely on Vite specifically, you could either: Create...
Read more >Testing Vite with minimal config using Vitest - LogRocket Blog
It gets better. First, let's see the necessary config for Jest plus Babel. We'll need some Jest config to stub out CSS module...
Read more >Unanswered 'element-plus' Questions - Stack Overflow
So, I am building a web application using Vue and element plus tables. In it the user can upload multiple tables select data...
Read more >Installation - Element Plus
Import style --> <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/element-plus/dist/index.css" /> <!-- Import Vue 3 --> <script ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
your repository is private ? 404
@8bu running the
https-preview
script: