Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
);
}
if (Mix.options.notifications) {
plugins.push(
new webpackPlugins.WebpackNotifierPlugin({
title : 'Ultimate Page Builder',
alwaysNotify : true,
contentImage : Mix.Paths.root('images/logo.png')
})
);
}
if (Mix.copy.length) {
new webpackPlugins.CopyWebpackPlugin(Mix.copy);
}
if (Mix.entry().hasExtractions()) {
// Abstract a common file between apps.
plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names : Mix.entry().getExtractions().map((manifest) => manifest.replace('manifest', 'upb-common')),
minChunks : Infinity,
})
);
}
if (Mix.options.versioning) {
plugins.push(
new webpack[Mix.inProduction ? 'HashedModuleIdsPlugin' : 'NamedModulesPlugin'](),
new webpackPlugins.WebpackChunkHashPlugin()
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
module.exports.plugins.push(
new plugins.WebpackOnBuildPlugin(
stats => Mix.events.fire('build', stats)
)
);
if (Mix.copy) {
Mix.copy.forEach(copy => {
module.exports.plugins.push(
new plugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.extract) {
module.exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entryBuilder.extractions.concat([
path.join(Mix.js.base, 'manifest')
]),
minChunks: Infinity
})
);
}
)
);
}
if (Mix.options.notifications) {
plugins.push(
new webpackPlugins.WebpackNotifierPlugin({
title: 'Laravel Mix',
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
if (Mix.copy.length) {
new webpackPlugins.CopyWebpackPlugin(Mix.copy);
}
if (Mix.entry().hasExtractions()) {
plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entry().getExtractions(),
minChunks: Infinity
})
);
}
if (Mix.options.versioning) {
plugins.push(
new webpack[Mix.inProduction ? 'HashedModuleIdsPlugin': 'NamedModulesPlugin'](),
new webpackPlugins.WebpackChunkHashPlugin()
}
if (Mix.notifications) {
module.exports.plugins.push(
new plugins.WebpackNotifierPlugin({
title: 'Laravel Mix',
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
if (Mix.copy) {
Mix.copy.forEach(copy => {
module.exports.plugins.push(
new plugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.extract) {
module.exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entryBuilder.extractions.concat([
path.join(Mix.js.base, 'manifest').replace(/\\/g, '/')
]),
minChunks: Infinity
})
);
}
)
);
}
if (Mix.options.notifications) {
plugins.push(
new webpackPlugins.WebpackNotifierPlugin({
title: 'Laravel Mix',
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
if (Mix.copy) {
Mix.copy.forEach(copy => {
plugins.push(
new webpackPlugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.entry().hasExtractions()) {
plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entry().getExtractions(),
minChunks: Infinity
})
);
}
Mix.versioning.prune(Mix.publicPath);
})
);
}
if (Mix.combine || Mix.minify) {
module.exports.plugins.push(
new plugins.WebpackOnBuildPlugin(() => {
Mix.concatenateAll().minifyAll();
})
);
}
if (Mix.copy) {
Mix.copy.forEach(copy => {
module.exports.plugins.push(
new plugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.js.vendor) {
module.exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: [Mix.js.base + '/vendor', Mix.js.base + '/' + 'manifest'],
minChunks: Infinity
})
);
}
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
module.exports.plugins.push(
new plugins.WebpackOnBuildPlugin(
stats => Mix.events.fire('build', stats)
)
);
if (Mix.copy) {
Mix.copy.forEach(copy => {
module.exports.plugins.push(
new plugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.extract) {
module.exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entryBuilder.extractions.concat([
path.join(Mix.js.base, 'manifest')
]),
minChunks: Infinity
})
);
)
);
}
if (Mix.options.notifications) {
plugins.push(
new webpackPlugins.WebpackNotifierPlugin({
title: 'Laravel Mix',
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
if (Mix.copy) {
Mix.copy.forEach(copy => {
plugins.push(
new webpackPlugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.entry().hasExtractions()) {
plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entry().getExtractions(),
minChunks: Infinity
})
);
}
if (Mix.options.versioning) {
title: 'Laravel Mix',
alwaysNotify: true,
contentImage: Mix.Paths.root('node_modules/laravel-mix/icons/laravel.png')
})
);
}
module.exports.plugins.push(
new plugins.WebpackOnBuildPlugin(
stats => Mix.events.fire('build', stats)
)
);
if (Mix.copy) {
Mix.copy.forEach(copy => {
module.exports.plugins.push(
new plugins.CopyWebpackPlugin([copy])
);
});
}
if (Mix.extract) {
module.exports.plugins.push(
new webpack.optimize.CommonsChunkPlugin({
names: Mix.entryBuilder.extractions.concat([
path.join(Mix.js.base, 'manifest')
]),
minChunks: Infinity
})