mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 14:34:18 +03:00
Remove HMR config from production webpack configuration.
This commit is contained in:
parent
48d19ddc72
commit
c846c9ff25
@ -121,10 +121,6 @@ function webpackOptions(
|
||||
{ debug, manifestConfig, routesWithRequests }
|
||||
) {
|
||||
const common = {
|
||||
entry: [
|
||||
require.resolve("webpack-hot-middleware/client"),
|
||||
path.resolve(process.cwd(), "./index.js"),
|
||||
],
|
||||
mode: production ? "production" : "development",
|
||||
plugins: [
|
||||
new AddFilesPlugin(routesWithRequests),
|
||||
@ -273,6 +269,7 @@ function webpackOptions(
|
||||
};
|
||||
if (production) {
|
||||
return merge(common, {
|
||||
entry: "./index.js",
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new ClosurePlugin(
|
||||
@ -322,6 +319,10 @@ function webpackOptions(
|
||||
});
|
||||
} else {
|
||||
return merge(common, {
|
||||
entry: [
|
||||
require.resolve("webpack-hot-middleware/client"),
|
||||
"./index.js",
|
||||
],
|
||||
plugins: [
|
||||
new webpack.NamedModulesPlugin(),
|
||||
// Prevents compilation errors causing the hot loader to lose state
|
||||
|
Loading…
Reference in New Issue
Block a user