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
5270edb7
Commit
5270edb7
authored
May 25, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name all webpack chunks to improve long term cacheability
parent
5c0f506d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
webpack.config.js
config/webpack.config.js
+13
-1
No files found.
config/webpack.config.js
View file @
5270edb7
...
...
@@ -70,7 +70,8 @@ var config = {
output
:
{
path
:
path
.
join
(
ROOT_PATH
,
'public/assets/webpack'
),
publicPath
:
'/assets/webpack/'
,
filename
:
IS_PRODUCTION
?
'[name].[chunkhash].bundle.js'
:
'[name].bundle.js'
filename
:
IS_PRODUCTION
?
'[name].[chunkhash].bundle.js'
:
'[name].bundle.js'
,
chunkFilename
:
IS_PRODUCTION
?
'[name].[chunkhash].chunk.js'
:
'[name].chunk.js'
,
},
devtool
:
'cheap-module-source-map'
,
...
...
@@ -131,6 +132,17 @@ var config = {
new
webpack
.
NamedModulesPlugin
(),
new
NameAllModulesPlugin
(),
// assign deterministic chunk ids
new
webpack
.
NamedChunksPlugin
((
chunk
)
=>
{
if
(
chunk
.
name
)
{
return
chunk
.
name
;
}
return
chunk
.
modules
.
map
((
m
)
=>
{
var
chunkPath
=
m
.
request
.
split
(
'!'
).
pop
();
return
path
.
relative
(
m
.
context
,
chunkPath
);
}).
join
(
'_'
);
}),
// create cacheable common library bundle for all vue chunks
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'common_vue'
,
...
...
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