-
Notifications
You must be signed in to change notification settings - Fork 403
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
配置 .babelrc 不起作用 #81
Comments
我这边也遇到了 |
我也遇到了同样的问题 |
不要再 vendors 里设置 antd |
@afc163 请问是指哪里的 vendor ?webpack ? |
是的 如果在 vendors 里面加入了 ant import这个插件就不起作用了 导致打包后还是2M 多 |
👌 |
+1 |
@Ben07 怎么解决的? |
@sym900728 2个entry,app和vendor,按webpack的文档来说,antd应该会打包在vendor上,但是这样和这个import插件有冲突。所以我把antd放在了app中。一个不好的就是app.js文件会变大。但是里面只包含antd使用了的组件的代码。总体文件大小相对来说是减少的。 |
@Ben07 我的用 webpack2 。在 app 里面加入 antd 并没有起作用。
Last login: Mon May 8 13:52:45 on ttys002 to be executed: node bin/server.js |
@sym900728
在loaders中添加
我比较好奇你看了官方文档了吗?关键的这段都没有看到
|
@Ben07 我在这里加了这个。
|
@Ben07 上面的webpack配置是开发模式的。生产模式代码并没有粘贴上去。 |
@sym900728 开发模式我没有管代码分不分离,没这个必要。打包的时候代码分离才有意义。看你写法感觉没问题,可能是和别的plugins冲突了吧。你要不先试下最精简的。 |
@Ben07 因为用到的东西太多。我试试删除掉别的。留下最简单的。 |
@sym900728 |
尝试了 1.x 和 2.x 两个不同版本的配置,console 还是有提示
You are using prebuilt antd,...
antd 1.11.2 + babel-plugin-antd 0.5.1
antd 2.0.1 + babel-plugin-import 1.0.1
The text was updated successfully, but these errors were encountered: