cereschen / vue3-admin-vite-template

vue3-element-admin-vite-template
23 stars 9 forks source link

动态导入组件时会提示Syntax Error: SassError: Undefined variable. #4

Open dybxin opened 3 years ago

dybxin commented 3 years ago

component: () => import(@/${trees[i].component}) 只是动态导入导致了 相关的问题。

Screenshot from 2021-09-07 10-47-04

在动态导入组件时候 会提示 :

` error in ./src/styles/sidebar.scss

Syntax Error: SassError: Undefined variable. ╷ 6 │ margin-left: $sideBarWidth; │ ^^^^^^^^^^^^^ ╵ src/styles/sidebar.scss 6:18 root stylesheet

@ ./src/styles/sidebar.scss 4:14-227 15:3-20:5 16:22-235 @ ./src lazy ^.\/.*$ namespace object @ ./src/store/modules/router.js @ ./src/store/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://192.168.1.48:8080&sockPath=/sockjs-node ./node_modules/@vue/cli-service/node_modules/webpack/hot/dev-server.js ./src/main.js `