Ant-design-pro: color.less 的代码删除后,还是会被引用

Created on 18 Jul 2019  ·  6Comments  ·  Source: ant-design/ant-design-pro

color.less 的代码删除后,还是会被引用

model下面的setting,的代码被 if (!lessNodesAppended) { }里面的代码被我住址了。还是回去引用color.less。而且只有生产环境会有,怎么回事呢

Most helpful comment

我在config/plugin.config.js里把引入ant-design-theme那段注释掉以后,打的包里index.html没有引入less.min.js了,这个color.less 也不会被引入,如果没用到主题切换功能可以用这个方法试试,仅供参考 @xgj1988

All 6 comments

生成的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 好的。我试试

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaoding picture kaoding  ·  3Comments

Jerry-goodboy picture Jerry-goodboy  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

ghost picture ghost  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments