Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
073b7219
Commit
073b7219
authored
7 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
chore:refine build:prod
parent
98604af1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/utils.js
+2
-1
2 additions, 1 deletion
build/utils.js
build/webpack.prod.conf.js
+15
-5
15 additions, 5 deletions
build/webpack.prod.conf.js
with
17 additions
and
6 deletions
build/utils.js
+
2
−
1
View file @
073b7219
...
...
@@ -21,7 +21,8 @@ exports.cssLoaders = function (options) {
}
var
postcssLoader
=
{
loader
:
'
postcss-loader
'
loader
:
'
postcss-loader
'
,
sourceMap
:
options
.
sourceMap
}
// generate loader string to be used with extract text plugin
...
...
This diff is collapsed.
Click to expand it.
build/webpack.prod.conf.js
+
15
−
5
View file @
073b7219
...
...
@@ -82,7 +82,7 @@ var webpackConfig = merge(baseWebpackConfig, {
// split vendor js into its own file
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'
vendor
'
,
minChunks
:
function
(
module
,
count
)
{
minChunks
:
function
(
module
)
{
// any required modules inside node_modules are extracted to vendor
return
(
module
.
resource
&&
...
...
@@ -93,6 +93,12 @@ var webpackConfig = merge(baseWebpackConfig, {
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'
manifest
'
,
minChunks
:
Infinity
}),
// split echarts into its own file
new
webpack
.
optimize
.
CommonsChunkPlugin
({
async
:
'
echarts
'
,
...
...
@@ -109,12 +115,16 @@ var webpackConfig = merge(baseWebpackConfig, {
return
context
&&
(
context
.
indexOf
(
'
xlsx
'
)
>=
0
);
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'
manifest
'
,
chunks
:
[
'
vendor
'
]
name
:
'
app
'
,
async
:
'
vendor-async
'
,
children
:
true
,
minChunks
:
3
}),
// copy custom static assets
new
CopyWebpackPlugin
([{
from
:
path
.
resolve
(
__dirname
,
'
../static
'
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment