skip asset compression in CI

This commit is contained in:
Mike Greiling 2017-05-30 11:41:50 -05:00
parent 94ed06562a
commit 9c6109db34
2 changed files with 10 additions and 3 deletions

View File

@ -430,6 +430,7 @@ gitlab:assets:compile:
USE_DB: "false"
SKIP_STORAGE_VALIDATION: "true"
WEBPACK_REPORT: "true"
NO_COMPRESSION: "true"
script:
- yarn install --pure-lockfile --production --cache-folder .yarn-cache
- bundle exec rake gitlab:assets:compile

View File

@ -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_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false';
var WEBPACK_REPORT = process.env.WEBPACK_REPORT;
var NO_COMPRESSION = process.env.NO_COMPRESSION;
var config = {
// because sqljs requires fs.
@ -222,11 +223,16 @@ if (IS_PRODUCTION) {
}),
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify('production') }
}),
new CompressionPlugin({
asset: '[path].gz[query]',
})
);
if (!NO_COMPRESSION) {
config.plugins.push(
new CompressionPlugin({
asset: '[path].gz[query]',
})
);
}
}
if (IS_DEV_SERVER) {