Skip to content

Instantly share code, notes, and snippets.

@hach-que
Last active December 15, 2017 06:06
Show Gist options
  • Save hach-que/22b5d46f8aabc14a90ebc15fdae027e5 to your computer and use it in GitHub Desktop.
Save hach-que/22b5d46f8aabc14a90ebc15fdae027e5 to your computer and use it in GitHub Desktop.
plugins: [
// >> Here we're matching bundles that start with "page-" <<
...bundles.filter(x => x.startsWith("page-")).map((value) => {
return new HtmlWebpackPlugin({
filename: path.join(__dirname, '/Views/Shared/Assets/_Gen_' + value + '_Scripts.cshtml'),
template: path.join(__dirname, '/Views/Shared/Assets/_ScriptsTemplate.cshtml'),
// >> Configures the chunks for global "page-" bundles <<
chunks: ['polyfills', 'jquery', 'bootstrap', value, 'font-awesome'],
inject: false,
chunksSortMode: 'manual',
})
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment