Switch to packaged version of webpack
This commit is contained in:
parent
5e38d68984
commit
72723286f7
3 changed files with 56 additions and 8 deletions
1
debian/control
vendored
1
debian/control
vendored
|
@ -349,6 +349,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||||
node-timeago.js,
|
node-timeago.js,
|
||||||
node-underscore,
|
node-underscore,
|
||||||
node-vue-resource (>= 1.5.1~),
|
node-vue-resource (>= 1.5.1~),
|
||||||
|
webpack (>= 4~),
|
||||||
node-webpack-stats-plugin,
|
node-webpack-stats-plugin,
|
||||||
# using npm for remaining as it is in contrib
|
# using npm for remaining as it is in contrib
|
||||||
# node-babel-core,
|
# node-babel-core,
|
||||||
|
|
59
debian/patches/0740-use-packaged-modules.patch
vendored
59
debian/patches/0740-use-packaged-modules.patch
vendored
|
@ -67,7 +67,7 @@
|
||||||
"raw-loader": "^1.0.0",
|
"raw-loader": "^1.0.0",
|
||||||
"sanitize-html": "^1.16.1",
|
"sanitize-html": "^1.16.1",
|
||||||
"select2": "3.5.2-browserify",
|
"select2": "3.5.2-browserify",
|
||||||
@@ -113,19 +81,14 @@
|
@@ -113,27 +81,18 @@
|
||||||
"stylelint-error-string-formatter": "1.0.2",
|
"stylelint-error-string-formatter": "1.0.2",
|
||||||
"svg4everybody": "2.1.9",
|
"svg4everybody": "2.1.9",
|
||||||
"three": "^0.84.0",
|
"three": "^0.84.0",
|
||||||
|
@ -87,10 +87,10 @@
|
||||||
"vue-router": "^3.0.2",
|
"vue-router": "^3.0.2",
|
||||||
"vue-template-compiler": "^2.6.10",
|
"vue-template-compiler": "^2.6.10",
|
||||||
"vue-virtual-scroll-list": "^1.3.1",
|
"vue-virtual-scroll-list": "^1.3.1",
|
||||||
@@ -133,7 +96,6 @@
|
"vuex": "^3.1.0",
|
||||||
"webpack": "^4.29.0",
|
- "webpack": "^4.29.0",
|
||||||
"webpack-bundle-analyzer": "^3.0.3",
|
- "webpack-bundle-analyzer": "^3.0.3",
|
||||||
"webpack-cli": "^3.2.1",
|
- "webpack-cli": "^3.2.1",
|
||||||
- "webpack-stats-plugin": "^0.2.1",
|
- "webpack-stats-plugin": "^0.2.1",
|
||||||
"worker-loader": "^2.0.0",
|
"worker-loader": "^2.0.0",
|
||||||
"xterm": "^3.5.0"
|
"xterm": "^3.5.0"
|
||||||
|
@ -106,3 +106,52 @@
|
||||||
@import "../../../node_modules/dropzone/dist/basic";
|
@import "../../../node_modules/dropzone/dist/basic";
|
||||||
@import "../../../node_modules/select2/select2";
|
@import "../../../node_modules/select2/select2";
|
||||||
|
|
||||||
|
--- a/config/webpack.config.js
|
||||||
|
+++ b/config/webpack.config.js
|
||||||
|
@@ -5,7 +5,6 @@
|
||||||
|
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
|
||||||
|
const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||||
|
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
|
|
||||||
|
const ROOT_PATH = '/usr/share/gitlab';
|
||||||
|
const CACHE_PATH = process.env.WEBPACK_CACHE_PATH || path.join(ROOT_PATH, 'tmp/cache');
|
||||||
|
@@ -119,12 +118,12 @@
|
||||||
|
|
||||||
|
resolve: {
|
||||||
|
extensions: ['.js', '.gql', '.graphql'],
|
||||||
|
- modules: ['/usr/share/gitlab/node_modules','/usr/share/gitlab/node_modules/mermaid/node_modules', '/usr/lib/nodejs'],
|
||||||
|
+ modules: ['/usr/share/gitlab/node_modules','/usr/share/gitlab/node_modules/mermaid/node_modules', '/usr/lib/nodejs', '/usr/share/nodejs'],
|
||||||
|
alias,
|
||||||
|
},
|
||||||
|
|
||||||
|
resolveLoader: {
|
||||||
|
- modules: ['/usr/share/gitlab/node_modules', '/usr/lib/nodejs'],
|
||||||
|
+ modules: ['/usr/share/gitlab/node_modules', '/usr/lib/nodejs','/usr/share/nodejs'],
|
||||||
|
},
|
||||||
|
|
||||||
|
module: {
|
||||||
|
@@ -316,16 +315,6 @@
|
||||||
|
// enable HMR only in webpack-dev-server
|
||||||
|
DEV_SERVER_LIVERELOAD && new webpack.HotModuleReplacementPlugin(),
|
||||||
|
|
||||||
|
- // optionally generate webpack bundle analysis
|
||||||
|
- WEBPACK_REPORT &&
|
||||||
|
- new BundleAnalyzerPlugin({
|
||||||
|
- analyzerMode: 'static',
|
||||||
|
- generateStatsFile: true,
|
||||||
|
- openAnalyzer: false,
|
||||||
|
- reportFilename: path.join(ROOT_PATH, 'webpack-report/index.html'),
|
||||||
|
- statsFilename: path.join(ROOT_PATH, 'webpack-report/stats.json'),
|
||||||
|
- }),
|
||||||
|
-
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.IS_GITLAB_EE': JSON.stringify(IS_EE),
|
||||||
|
}),
|
||||||
|
@@ -347,5 +336,5 @@
|
||||||
|
devtool: NO_SOURCEMAPS ? false : devtool,
|
||||||
|
|
||||||
|
// sqljs requires fs
|
||||||
|
- node: { fs: 'empty' },
|
||||||
|
+ node: { fs: 'empty', Buffer: "mock" },
|
||||||
|
};
|
||||||
|
|
4
debian/rake-tasks.sh
vendored
4
debian/rake-tasks.sh
vendored
|
@ -42,6 +42,4 @@ echo "Precompiling assets..."
|
||||||
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake tmp:cache:clear assets:precompile'
|
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake tmp:cache:clear assets:precompile'
|
||||||
|
|
||||||
echo "Webpacking..."
|
echo "Webpacking..."
|
||||||
#runuser -u ${gitlab_user} -- sh -c 'rm -rf node_modules/webpack'
|
runuser -u ${gitlab_user} -- sh -c 'webpack --config config/webpack.config.js'
|
||||||
#runuser -u ${gitlab_user} -- sh -c 'rm -rf node_modules/webpack-bundle-analyzer'
|
|
||||||
runuser -u ${gitlab_user} -- sh -c 'node_modules/.bin/webpack --config config/webpack.config.js'
|
|
||||||
|
|
Loading…
Reference in a new issue