vite-plugin-theme-preprocessor icon indicating copy to clipboard operation
vite-plugin-theme-preprocessor copied to clipboard

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

Open hellokatewj opened this issue 3 years ago • 0 comments

想在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" }

hellokatewj avatar Jun 08 '22 11:06 hellokatewj