skip asset compression in CI
This commit is contained in:
parent
94ed06562a
commit
9c6109db34
|
@ -430,6 +430,7 @@ gitlab:assets:compile:
|
||||||
USE_DB: "false"
|
USE_DB: "false"
|
||||||
SKIP_STORAGE_VALIDATION: "true"
|
SKIP_STORAGE_VALIDATION: "true"
|
||||||
WEBPACK_REPORT: "true"
|
WEBPACK_REPORT: "true"
|
||||||
|
NO_COMPRESSION: "true"
|
||||||
script:
|
script:
|
||||||
- yarn install --pure-lockfile --production --cache-folder .yarn-cache
|
- yarn install --pure-lockfile --production --cache-folder .yarn-cache
|
||||||
- bundle exec rake gitlab:assets:compile
|
- bundle exec rake gitlab:assets:compile
|
||||||
|
|
|
@ -16,6 +16,7 @@ var DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';
|
||||||
var DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808;
|
var DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808;
|
||||||
var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false';
|
var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false';
|
||||||
var WEBPACK_REPORT = process.env.WEBPACK_REPORT;
|
var WEBPACK_REPORT = process.env.WEBPACK_REPORT;
|
||||||
|
var NO_COMPRESSION = process.env.NO_COMPRESSION;
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
// because sqljs requires fs.
|
// because sqljs requires fs.
|
||||||
|
@ -222,12 +223,17 @@ if (IS_PRODUCTION) {
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': { NODE_ENV: JSON.stringify('production') }
|
'process.env': { NODE_ENV: JSON.stringify('production') }
|
||||||
}),
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!NO_COMPRESSION) {
|
||||||
|
config.plugins.push(
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
asset: '[path].gz[query]',
|
asset: '[path].gz[query]',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_DEV_SERVER) {
|
if (IS_DEV_SERVER) {
|
||||||
config.devtool = 'cheap-module-eval-source-map';
|
config.devtool = 'cheap-module-eval-source-map';
|
||||||
|
|
Loading…
Reference in New Issue