Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ef59af5e
Unverified
Commit
ef59af5e
authored
Mar 05, 2019
by
Torkel Ödegaard
Committed by
GitHub
Mar 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15795 from grafana/split-chunks-in-dev
Split javascript to a vendor chunk in dev-mode
parents
a57310ef
e3ddfccb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
31 deletions
+13
-31
scripts/webpack/webpack.common.js
+13
-1
scripts/webpack/webpack.dev.js
+0
-19
scripts/webpack/webpack.prod.js
+0
-11
No files found.
scripts/webpack/webpack.common.js
View file @
ef59af5e
...
...
@@ -10,7 +10,7 @@ module.exports = {
path
:
path
.
resolve
(
__dirname
,
'../../public/build'
),
filename
:
'[name].[hash].js'
,
// Keep publicPath relative for host.com/grafana/ deployments
publicPath
:
"public/build/"
,
publicPath
:
'public/build/'
,
},
resolve
:
{
extensions
:
[
'.ts'
,
'.tsx'
,
'.es6'
,
'.js'
,
'.json'
,
'.svg'
],
...
...
@@ -61,6 +61,18 @@ module.exports = {
}
]
},
// https://webpack.js.org/plugins/split-chunks-plugin/#split-chunks-example-3
optimization
:
{
splitChunks
:
{
cacheGroups
:
{
commons
:
{
test
:
/
[\\/]
node_modules
[\\/]
.*
[
jt
]
sx
?
$/
,
name
:
'vendor'
,
chunks
:
'all'
}
}
}
},
plugins
:
[
new
ForkTsCheckerWebpackPlugin
({
checkSyntacticErrors
:
true
,
...
...
scripts/webpack/webpack.dev.js
View file @
ef59af5e
...
...
@@ -58,25 +58,6 @@ module.exports = merge(common, {
]
},
optimization
:
{
splitChunks
:
{
cacheGroups
:
{
manifest
:
{
chunks
:
"initial"
,
test
:
"vendor"
,
name
:
"vendor"
,
enforce
:
true
},
vendor
:
{
chunks
:
"initial"
,
test
:
"vendor"
,
name
:
"vendor"
,
enforce
:
true
}
}
}
},
plugins
:
[
new
CleanWebpackPlugin
(
'../../public/build'
,
{
allowExternal
:
true
}),
new
MiniCssExtractPlugin
({
...
...
scripts/webpack/webpack.prod.js
View file @
ef59af5e
...
...
@@ -47,17 +47,7 @@ module.exports = merge(common, {
})
]
},
optimization
:
{
splitChunks
:
{
cacheGroups
:
{
commons
:
{
test
:
/
[\\/]
node_modules
[\\/]
.*
[
jt
]
sx
?
$/
,
name
:
"vendor"
,
chunks
:
"all"
}
}
},
minimizer
:
[
new
UglifyJsPlugin
({
cache
:
true
,
...
...
@@ -67,7 +57,6 @@ module.exports = merge(common, {
new
OptimizeCSSAssetsPlugin
({})
]
},
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
"grafana.[name].[hash].css"
...
...
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