Closed baiyuze closed 1 month ago
try adding this to your vite.config.ts
ssr: {
noExternal: ['element-plus']
}
try adding this to your vite.config.ts
ssr: { noExternal: ['element-plus'] }
Not reporting. scss, but triggering another error SyntaxError: The requested module '@vueuse/core' does not provide an export named 'isBoolean'
try adding this to your vite.config.ts
ssr: { noExternal: ['element-plus'] }
I went to the @ vueuse/core library to check and found out that it was a version issue. I downgraded it to 9 and it was resolved. There are no errors now. Please write it down
It was fixed quite a while ago - https://github.com/element-plus/element-plus/pull/12504 -- you probably are on some older version of element-plus.
它很久以前就被修复了 - element-plus/element-plus#12504 - 你可能使用的是一些旧版本的 element-plus。
"It is indeed an old version of the component, but the new version, 2.6.2, still has a bug with useSelect. However, it has been fixed, but a new version has not been released yet, so there has been no upgrade.
However, it should also be related to the version of @vueuse/core used by the main body of the application.
Overall, as long as it can be resolved, it's fine. Thank you!"
Describe the bug
I used element plus in vitepress and unplugin vue components to import styles and components as needed. Normally, npm run docs: dev works fine, but npm run docs: build reports an error. TypeError: Unknown file extension ". scss" for/Users/Guangdong/Desktop/Information ui/nodeModules/element plus/theme chat/src/base.scss
Also, it is normal for me not to configure vite.config.ts in vitepress. Request help
我使用vitepress中用了element-plus,同时用了unplugin-vue-components来按需导入样式及组件,正常npm run docs:dev正常,但是npm run docs:build就报错。TypeError: Unknown file extension ".scss" for /Users/guangguang/Desktop/information-ui/node_modules/element-plus/theme-chalk/src/base.scss
另外我不在vitepress中配置vite.config.ts是正常的。 请求帮助
vite.config.ts:
vitepress:
Reproduction
https://stackblitz.com/edit/vite-mp5jmc?file=docs%2Findex.md
Expected behavior
正常编译
System Info
Additional context
No response
Validations