GitOfZGT / vite-plugin-theme-preprocessor

css theme preprocessor plugin for vite
MIT License
161 stars 15 forks source link

添加插件后无法导出less变量 #45

Open hellokatewj opened 2 years ago

hellokatewj commented 2 years ago

想在js中导入less变量,添加插件后无法使用:export导出less变量,只能导出插件中设置的scopeName

dark.module.less 代码如下: @color-primary: #253E7A; :export { primary: @color-primary; }

js文件中导入: import dark from '@/assets/style/theme/dark.module.less';

dark打印出来是: { theme-dark: "theme-dark", theme-default: "theme-default" }