BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
632b992d
Commit
632b992d
authored
Jun 12, 2017
by
Marin Jankovski
Committed by
Clement Ho
Jun 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'fall-back-to-gzip-when-missing-optional-deps' into 'master'
Fall back to gzip when missing optional zopfli dependency See merge request !12068
parent
a2fd106b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
webpack.config.js
config/webpack.config.js
+10
-1
No files found.
config/webpack.config.js
View file @
632b992d
...
...
@@ -18,6 +18,15 @@ var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false';
var
WEBPACK_REPORT
=
process
.
env
.
WEBPACK_REPORT
;
var
NO_COMPRESSION
=
process
.
env
.
NO_COMPRESSION
;
// optional dependency `node-zopfli` is unavailable on CentOS 6
var
ZOPFLI_AVAILABLE
;
try
{
require
.
resolve
(
'node-zopfli'
);
ZOPFLI_AVAILABLE
=
true
;
}
catch
(
err
)
{
ZOPFLI_AVAILABLE
=
false
;
}
var
config
=
{
// because sqljs requires fs.
node
:
{
...
...
@@ -224,7 +233,7 @@ if (IS_PRODUCTION) {
config
.
plugins
.
push
(
new
CompressionPlugin
({
asset
:
'[path].gz[query]'
,
algorithm
:
'zopfli
'
,
algorithm
:
ZOPFLI_AVAILABLE
?
'zopfli'
:
'gzip
'
,
})
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment