Created
March 5, 2018 21:47
-
-
Save ruddell/a87f7d5c5a58b8d47e9cc5dd80af9baa to your computer and use it in GitHub Desktop.
downgrade-webpack.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5a191214600a0898f514229851979ab388eeb14b Mon Sep 17 00:00:00 2001 | |
From: Jonathan Ruddell <jonathan.ruddell@gmail.com> | |
Date: Mon, 5 Mar 2018 16:42:43 -0500 | |
Subject: [PATCH] downgrade webpack for yarn start | |
--- | |
package.json | 7 ++++--- | |
webpack/webpack.common.js | 18 +++++++++++++++++- | |
webpack/webpack.dev.js | 5 +++-- | |
webpack/webpack.prod.js | 3 +-- | |
4 files changed, 25 insertions(+), 8 deletions(-) | |
diff --git a/package.json b/package.json | |
index d4238cf..2e57eaf 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -36,7 +36,7 @@ | |
"devDependencies": { | |
"@angular/cli": "1.6.6", | |
"@angular/compiler-cli": "5.2.0", | |
- "@ngtools/webpack": "6.0.0-beta.4", | |
+ "@ngtools/webpack": "1.8.5", | |
"@types/jasmine": "2.5.53", | |
"@types/node": "8.0.18", | |
"angular2-template-loader": "0.6.2", | |
@@ -66,6 +66,7 @@ | |
"karma-sourcemap-loader": "0.3.7", | |
"karma-webpack": "2.0.4", | |
"lint-staged": "6.0.0", | |
+ "web-app-manifest-loader": "0.1.1", | |
"merge-jsons-webpack-plugin": "1.0.14", | |
"phantomjs-prebuilt": "2.1.16", | |
"prettier": "1.9.2", | |
@@ -82,9 +83,9 @@ | |
"typescript": "2.6.2", | |
"xml2js": "0.4.17", | |
"uglifyjs-webpack-plugin": "1.2.2", | |
- "webpack": "4.0.0", | |
+ "webpack": "3.10.0", | |
"webpack-cli": "2.0.10", | |
- "webpack-dev-server": "3.0.1-beta.0", | |
+ "webpack-dev-server": "2.9.5", | |
"webpack-merge": "4.1.1", | |
"webpack-notifier": "1.5.1", | |
"webpack-visualizer-plugin": "0.1.11", | |
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js | |
index 89d8225..0df4ba4 100644 | |
--- a/webpack/webpack.common.js | |
+++ b/webpack/webpack.common.js | |
@@ -39,7 +39,7 @@ module.exports = (options) => ({ | |
}, | |
{ | |
test: /manifest.webapp$/, | |
- loader: 'file-loader?name=manifest.webapp' | |
+ loader: 'file-loader?name=manifest.webapp!web-app-manifest-loader' | |
} | |
] | |
}, | |
@@ -57,6 +57,22 @@ module.exports = (options) => ({ | |
SERVER_API_URL: `''` | |
} | |
}), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: 'polyfills', | |
+ chunks: ['polyfills'] | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: 'vendor', | |
+ chunks: ['main'], | |
+ minChunks: module => utils.isExternalLib(module) | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: ['polyfills', 'vendor'].reverse() | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: ['manifest'], | |
+ minChunks: Infinity, | |
+ }), | |
/** | |
* See: https://github.com/angular/angular/issues/11580 | |
*/ | |
diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js | |
index 38391b9..e9a87e0 100644 | |
--- a/webpack/webpack.dev.js | |
+++ b/webpack/webpack.dev.js | |
@@ -76,6 +76,8 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
}, { | |
reload: false | |
}), | |
+ new webpack.NoEmitOnErrorsPlugin(), | |
+ new webpack.NamedModulesPlugin(), | |
new writeFilePlugin(), | |
new webpack.WatchIgnorePlugin([ | |
utils.root('src/test'), | |
@@ -84,6 +86,5 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
title: 'JHipster', | |
contentImage: path.join(__dirname, 'logo-jhipster.png') | |
}) | |
- ], | |
- mode: 'development' | |
+ ] | |
}); | |
diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js | |
index 14a31b4..a8857a9 100644 | |
--- a/webpack/webpack.prod.js | |
+++ b/webpack/webpack.prod.js | |
@@ -90,6 +90,5 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
clientsClaim: true, | |
skipWaiting: true, | |
}) | |
- ], | |
- mode: 'production' | |
+ ] | |
}); | |
-- | |
2.14.3 (Apple Git-98) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5a191214600a0898f514229851979ab388eeb14b Mon Sep 17 00:00:00 2001 | |
From: Jonathan Ruddell <jonathan.ruddell@gmail.com> | |
Date: Mon, 5 Mar 2018 16:42:43 -0500 | |
Subject: [PATCH] downgrade webpack for yarn start | |
--- | |
package.json | 7 ++++--- | |
webpack/webpack.common.js | 18 +++++++++++++++++- | |
webpack/webpack.dev.js | 5 +++-- | |
webpack/webpack.prod.js | 3 +-- | |
4 files changed, 25 insertions(+), 8 deletions(-) | |
diff --git a/package.json b/package.json | |
index d4238cf..2e57eaf 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -36,7 +36,7 @@ | |
"devDependencies": { | |
"@angular/cli": "1.6.6", | |
"@angular/compiler-cli": "5.2.0", | |
- "@ngtools/webpack": "6.0.0-beta.4", | |
+ "@ngtools/webpack": "1.8.5", | |
"@types/jasmine": "2.5.53", | |
"@types/node": "8.0.18", | |
"angular2-template-loader": "0.6.2", | |
@@ -66,6 +66,7 @@ | |
"karma-sourcemap-loader": "0.3.7", | |
"karma-webpack": "2.0.4", | |
"lint-staged": "6.0.0", | |
+ "web-app-manifest-loader": "0.1.1", | |
"merge-jsons-webpack-plugin": "1.0.14", | |
"phantomjs-prebuilt": "2.1.16", | |
"prettier": "1.9.2", | |
@@ -82,9 +83,9 @@ | |
"typescript": "2.6.2", | |
"xml2js": "0.4.17", | |
"uglifyjs-webpack-plugin": "1.2.2", | |
- "webpack": "4.0.0", | |
+ "webpack": "3.10.0", | |
"webpack-cli": "2.0.10", | |
- "webpack-dev-server": "3.0.1-beta.0", | |
+ "webpack-dev-server": "2.9.5", | |
"webpack-merge": "4.1.1", | |
"webpack-notifier": "1.5.1", | |
"webpack-visualizer-plugin": "0.1.11", | |
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js | |
index 89d8225..0df4ba4 100644 | |
--- a/webpack/webpack.common.js | |
+++ b/webpack/webpack.common.js | |
@@ -39,7 +39,7 @@ module.exports = (options) => ({ | |
}, | |
{ | |
test: /manifest.webapp$/, | |
- loader: 'file-loader?name=manifest.webapp' | |
+ loader: 'file-loader?name=manifest.webapp!web-app-manifest-loader' | |
} | |
] | |
}, | |
@@ -57,6 +57,22 @@ module.exports = (options) => ({ | |
SERVER_API_URL: `''` | |
} | |
}), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: 'polyfills', | |
+ chunks: ['polyfills'] | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: 'vendor', | |
+ chunks: ['main'], | |
+ minChunks: module => utils.isExternalLib(module) | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: ['polyfills', 'vendor'].reverse() | |
+ }), | |
+ new webpack.optimize.CommonsChunkPlugin({ | |
+ name: ['manifest'], | |
+ minChunks: Infinity, | |
+ }), | |
/** | |
* See: https://github.com/angular/angular/issues/11580 | |
*/ | |
diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js | |
index 38391b9..e9a87e0 100644 | |
--- a/webpack/webpack.dev.js | |
+++ b/webpack/webpack.dev.js | |
@@ -76,6 +76,8 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
}, { | |
reload: false | |
}), | |
+ new webpack.NoEmitOnErrorsPlugin(), | |
+ new webpack.NamedModulesPlugin(), | |
new writeFilePlugin(), | |
new webpack.WatchIgnorePlugin([ | |
utils.root('src/test'), | |
@@ -84,6 +86,5 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
title: 'JHipster', | |
contentImage: path.join(__dirname, 'logo-jhipster.png') | |
}) | |
- ], | |
- mode: 'development' | |
+ ] | |
}); | |
diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js | |
index 14a31b4..a8857a9 100644 | |
--- a/webpack/webpack.prod.js | |
+++ b/webpack/webpack.prod.js | |
@@ -90,6 +90,5 @@ module.exports = webpackMerge(commonConfig({ env: ENV }), { | |
clientsClaim: true, | |
skipWaiting: true, | |
}) | |
- ], | |
- mode: 'production' | |
+ ] | |
}); | |
-- | |
2.14.3 (Apple Git-98) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment