Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}),
]
);
}
// Ensures NODE_ENV
o.webpack.plugins.push(
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
})
);
if (o.liveReload) {
o.webpack.plugins.push(new LiveReload(o.liveReload || null));
}
const sourceName = path.basename(o.source)
.replace(path.extname(o.source), '.js');
const config = {
...o.webpack,
watch: o.watch,
entry: [
...this.config.webpack.entry,
o.source,
],
devtool: o.compress
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
unused : true,
dead_code : true,
warnings : false,
drop_debugger : true,
screw_ie8 : true,
},
}),
]
);
}
if (o.liveReload) {
o.webpack.plugins.push(new LiveReload(o.liveReload || null));
}
const sourceName = path.basename(o.source)
.replace(path.extname(o.source), '.js');
const config = {
...o.webpack,
watch: o.watch,
entry: [
...this.config.webpack.entry,
o.source,
],
devtool: o.compress
...[
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
unused : true,
dead_code : true,
warnings : false,
drop_debugger : true,
screw_ie8 : true,
}
}),
]
)
if ( o.liveReload )
o.webpack.plugins.push( new LiveReload(o.liveReload || null) )
const config = {
...o.webpack,
watch: o.watch,
entry: [
...this.config.webpack.entry,
o.source
],
devtool: o.compress
? false
: o.webpack.devtool,
module: {
unused : true,
dead_code : true,
warnings : false,
drop_debugger : true,
screw_ie8 : true,
}
}),
]
)
if ( options.liveReload ) {
let liveOptions = typeOf.Object(options.liveReload)
? options.liveReload
: null
plugins.push(new LiveReload(liveOptions))
}
const eslint = options.webpack.eslint
? options.webpack.eslint
: this.config.webpack.eslint
let config = {
watch : options.watch,
entry : [ 'babel-polyfill', options.source ],
devtool : options.compress
? false
: options.webpack.devtool || 'source-map',
module : {
preLoaders: this.config.webpack.preLoaders,
loaders
},