[plugin:vite:css] Can't find stylesheet to import.
╷
25 │ @import "~element-ui/packages/theme-chalk/src/index";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
src\styles\element-variables.scss 25:9 root stylesheet
请问有同学遇到过这种情况吗,一般要怎么解决?
以下是我vite.config.js的配置
import {
defineConfig
} from 'vite'
import {
createVuePlugin
} from 'vite-plugin-vue2'
import {
resolve
} from 'path'
export default defineConfig({
plugins: [
createVuePlugin()
],
server: {
open: true
},
alias: [{
find: '@',
replacement: resolve(__dirname, 'src')
}]
})
擅用搜索
参考解决办法
https://blog.csdn.net/jian_xi...
-- 其他建议
vue-element-admin 建议先不要用vite