ant-tool/atool-build

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

SSebo opened this issue · 2 comments

SSebo commented
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

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

非常感谢