set ROOT_PATH in webpack.config.js
This commit is contained in:
parent
93b5160611
commit
a1423d278a
3 changed files with 13 additions and 1 deletions
2
debian/patches/0400-use-npm-webpack.patch
vendored
2
debian/patches/0400-use-npm-webpack.patch
vendored
|
@ -5,7 +5,7 @@
|
||||||
"karma-start": "karma start config/karma.config.js",
|
"karma-start": "karma start config/karma.config.js",
|
||||||
"webpack": "webpack --config config/webpack.config.js",
|
"webpack": "webpack --config config/webpack.config.js",
|
||||||
- "webpack-prod": "NODE_ENV=production webpack --config config/webpack.config.js"
|
- "webpack-prod": "NODE_ENV=production webpack --config config/webpack.config.js"
|
||||||
+ "webpack-prod": "NODE_ENV=production NODE_PATH=/usr/share/gitlab/node_modules node_modules/.bin/webpack --context /usr/share/gitlab/app/assets/javascripts --config config/webpack.config.js"
|
+ "webpack-prod": "NODE_ENV=production NODE_PATH=/usr/share/gitlab/node_modules node_modules/.bin/webpack --config config/webpack.config.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-core": "^6.22.1",
|
"babel-core": "^6.22.1",
|
||||||
|
|
11
debian/patches/0410-set-webpack-root.patch
vendored
Normal file
11
debian/patches/0410-set-webpack-root.patch
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/config/webpack.config.js
|
||||||
|
+++ b/config/webpack.config.js
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
|
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
||||||
|
|
||||||
|
-var ROOT_PATH = path.resolve(__dirname, '..');
|
||||||
|
+var ROOT_PATH = '/usr/share/gitlab';
|
||||||
|
var IS_PRODUCTION = process.env.NODE_ENV === 'production';
|
||||||
|
var IS_DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') !== -1;
|
||||||
|
var DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -14,3 +14,4 @@ pid-log-paths.patch
|
||||||
0270-relax-toml-rb.patch
|
0270-relax-toml-rb.patch
|
||||||
0280-relax-pg.patch
|
0280-relax-pg.patch
|
||||||
0400-use-npm-webpack.patch
|
0400-use-npm-webpack.patch
|
||||||
|
0410-set-webpack-root.patch
|
||||||
|
|
Loading…
Reference in a new issue