color.less 的代码删除后,还是会被引用
model下面的setting,的代码被 if (!lessNodesAppended) { }里面的代码被我住址了。还是回去引用color.less。而且只有生产环境会有,怎么回事呢
生成的dist/index.html时候会增加这个代码<link rel="stylesheet/less" type="text/css" href="/color.less" />.
而且也会生成 <script>
window.less = {
async: false,
env: 'production'
};
</script>
https://pro.ant.design/blog/change-theme-cn
可以看看这个,功能主要是插件提供的
@chenshuai2144 大各。我看了,但是上面也没说哪里可以取消啊。。
我在config/plugin.config.js里把引入ant-design-theme那段注释掉以后,打的包里index.html没有引入less.min.js了,这个color.less 也不会被引入,如果没用到主题切换功能可以用这个方法试试,仅供参考 @xgj1988
@Toninie 好的。我试试
Most helpful comment
我在config/plugin.config.js里把引入ant-design-theme那段注释掉以后,打的包里index.html没有引入less.min.js了,这个color.less 也不会被引入,如果没用到主题切换功能可以用这个方法试试,仅供参考 @xgj1988