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

Create .babelrc #156

Closed
wants to merge 1 commit into from
Closed

Create .babelrc #156

wants to merge 1 commit into from

Conversation

zuiidea
Copy link

@zuiidea zuiidea commented Oct 12, 2016

babel-plugin-import need

babel-plugin-import need
@coveralls
Copy link

coveralls commented Oct 12, 2016

Coverage Status

Coverage remained the same at 94.186% when pulling 3c0f61d on zuiidea:patch-2 into 58c27b6 on dvajs:master.

@sorrycc
Copy link
Member

sorrycc commented Oct 13, 2016

不要加 .babelrc,在 webpack.config.js 里改。

@sorrycc sorrycc closed this Oct 13, 2016
@zuiidea
Copy link
Author

zuiidea commented Oct 13, 2016

@sorrycc 在webpack.config.js里修改后报错了,添加 .babelrc则正常运行

https://github.com/dvajs/dva/blob/master/examples/user-dashboard/webpack.config.js#L8

  webpackConfig.babel.babelrc = false;
  webpackConfig.babel.plugins.push('transform-runtime');
  webpackConfig.babel.plugins.push(['antd', {
    style: 'css'  // if true, use less
  }]);

image

@nikogu
Copy link
Member

nikogu commented Oct 13, 2016

@zuiidea 原封不动的运行就可以跑,不需要改任何东西的

@zuiidea
Copy link
Author

zuiidea commented Oct 13, 2016

@nikogu 我第一次跑,生成的样式文件中antd的组件样式没加上,console提示安装babel-plugin-import

@951565664
Copy link

@sorrycc 新版本(roadhogrc)怎么配babelrc

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

Successfully merging this pull request may close these issues.

5 participants