I'm wondering how to use this plugin with webpack-dev-server? I get this to work beautifully when applying production builds using webpack -p build command, but when I try to use this with dev-server, the client will not naturally find the output js-file (hence -it's not actually produced in server-mode)
Here's my current plugins and their settings:
plugins: [
new BundleAnalyzerPlugin(),
new ServiceWorkerWebpackPlugin({
entry: `${APP_DIR}/service-worker.js`,
filename: "../service-worker.js",
excludes: [ "**/.*", "**/*.map", "*.html" ],
})
new webpack.NamedModulesPlugin(), // Named Modules for DEV:
new webpack.HotModuleReplacementPlugin(),
new webpack.optimize.CommonsChunkPlugin({
name: [ "vendor", "polyfills" ]
}),
new HtmlWebpackPlugin({
filename: "../index.html",
title: "Learning Diary Project",
template: `${APP_DIR}/index.ejs`,
alwaysWriteToDisk: true
}),
new HtmlWebpackHarddiskPlugin(),
]
Hi!
I'm wondering how to use this plugin with webpack-dev-server? I get this to work beautifully when applying production builds using
webpack -p build
command, but when I try to use this with dev-server, the client will not naturally find the output js-file (hence -it's not actually produced in server-mode)Here's my current plugins and their settings: