Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
roachjc committed Oct 5, 2017
1 parent 7a3f6e5 commit 88240b4
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,32 @@ module.exports = (env) => {
],
};

const launch = {
output: {
path: path.join(__dirname, 'plugin/npm-module/build'),
filename: 'app.js',
const launch = merge([
{
output: {
path: path.join(__dirname, 'plugin/npm-module/build'),
filename: 'app.js',
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('data') }),
new WebpackMonitor({ launch: true, capture: false }),
],
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('data') }),
new WebpackMonitor({ launch: true, capture: false }),
],
};
utils.uglifyJS(),
]);

const confirm = {
output: {
path: path.join(__dirname, 'plugin/npm-module/build'),
filename: 'app.js',
const confirm = merge([
{
output: {
path: path.join(__dirname, 'plugin/npm-module/build'),
filename: 'app.js',
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('data') }),
new WebpackMonitor({ capture: true }),
],
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('data') }),
new WebpackMonitor({ capture: true }),
],
};
]);

if (env === 'development') return merge([common, development]);
if (env === 'confirm') return merge([common, confirm]);
Expand Down

0 comments on commit 88240b4

Please sign in to comment.