Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按需引入后 自定义主题配置无效 #50

Closed
lchxiang opened this issue Nov 27, 2021 · 4 comments
Closed

按需引入后 自定义主题配置无效 #50

lchxiang opened this issue Nov 27, 2021 · 4 comments

Comments

@lchxiang
Copy link

自定义主题色无效
image
image

@lchxiang lchxiang changed the title 按需引入后 自定义主题色配置无效 按需引入后 自定义主题配置无效 Nov 29, 2021
@thpngj
Copy link

thpngj commented Nov 29, 2021

版本 1.3.0 引用正常, 升级到 版本 1.4.0 按需引用 路径 就报错~ 检查了好久才找到问题是出在了版本上~
export default {
plugins: [
vue(),
styleImport({
libs: [
{
libraryName: 'vant',
esModule: true,
resolveStyle: (name) => /node_modules/vant/es/${name}/style,
},
],
}),
],
};

1.4.0版本 ,路径里 加上 /node_modules/ 才正常,1.3.0 却不需要~ 不知道是不是作者写的代码出bug 了 ?

@lchxiang lchxiang closed this as completed Dec 3, 2021
@lchxiang
Copy link
Author

lchxiang commented Dec 3, 2021

不好意思 搞错了 用的AntDesignVueResolver按需加载

@lchxiang lchxiang reopened this Dec 3, 2021
@zybzzc
Copy link

zybzzc commented Dec 6, 2021

不好意思 搞错了 用的AntDesignVueResolver按需加载

确实有这个问题啊,我也遇到了,跟你的配置一样,你解决了吗

@anncwb
Copy link
Collaborator

anncwb commented Jan 29, 2022

用 modifyVars修改

css: {
      preprocessorOptions: {
        less: {
          javascriptEnabled: true,
          modifyVars: {},
        },
      },
    },

@anncwb anncwb closed this as completed Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants