mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-01 07:45:22 +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 }
|
{ debug, manifestConfig, routesWithRequests }
|
||||||
) {
|
) {
|
||||||
const common = {
|
const common = {
|
||||||
entry: [
|
|
||||||
require.resolve("webpack-hot-middleware/client"),
|
|
||||||
path.resolve(process.cwd(), "./index.js"),
|
|
||||||
],
|
|
||||||
mode: production ? "production" : "development",
|
mode: production ? "production" : "development",
|
||||||
plugins: [
|
plugins: [
|
||||||
new AddFilesPlugin(routesWithRequests),
|
new AddFilesPlugin(routesWithRequests),
|
||||||
@ -273,6 +269,7 @@ function webpackOptions(
|
|||||||
};
|
};
|
||||||
if (production) {
|
if (production) {
|
||||||
return merge(common, {
|
return merge(common, {
|
||||||
|
entry: "./index.js",
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new ClosurePlugin(
|
new ClosurePlugin(
|
||||||
@ -322,6 +319,10 @@ function webpackOptions(
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return merge(common, {
|
return merge(common, {
|
||||||
|
entry: [
|
||||||
|
require.resolve("webpack-hot-middleware/client"),
|
||||||
|
"./index.js",
|
||||||
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.NamedModulesPlugin(),
|
new webpack.NamedModulesPlugin(),
|
||||||
// Prevents compilation errors causing the hot loader to lose state
|
// Prevents compilation errors causing the hot loader to lose state
|
||||||
|
Loading…
Reference in New Issue
Block a user