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

如何在atool-build的webpack配置文件中,添加新plugin? #32

Closed
SSebo opened this issue Dec 30, 2015 · 2 comments
Closed

如何在atool-build的webpack配置文件中,添加新plugin? #32

SSebo opened this issue Dec 30, 2015 · 2 comments

Comments

@SSebo
Copy link

SSebo commented Dec 30, 2015

webpackConfig.plugins.push(
    new webpack.DefinePlugin({
      __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')),
      __PRERELEASE__: JSON.stringify(JSON.parse(process.env.BUILD_PRERELEASE || 'false'))
    })
  );

会报错,说webpack not defined

@sorrycc
Copy link
Member

sorrycc commented Dec 30, 2015

var webpack = require('atool-build/lib/webpack');

@SSebo
Copy link
Author

SSebo commented Dec 30, 2015

非常感谢

@SSebo SSebo closed this as completed Dec 30, 2015
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

2 participants