Skip to content

Commit 4a12f09

Browse files
fix: Minify build correctly
1 parent 9149bc4 commit 4a12f09

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ max_line_length = off
1111

1212
[*.md]
1313
trim_trailing_whitespace = false
14+
15+
[VERSION]
16+
insert_final_newline = false

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.229.0
1+
1.229.0

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/jil/util/browsers-supported.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
},
1010
{
1111
"browserName": "chrome",
12-
"platform": "Windows 11",
13-
"platformName": "Windows 11",
14-
"version": "107",
15-
"browserVersion": "107"
12+
"platform": "Windows 10",
13+
"platformName": "Windows 10",
14+
"version": "108",
15+
"browserVersion": "108"
1616
},
1717
{
1818
"browserName": "chrome",
@@ -23,10 +23,10 @@
2323
},
2424
{
2525
"browserName": "chrome",
26-
"platform": "Windows 11",
27-
"platformName": "Windows 11",
28-
"version": "100",
29-
"browserVersion": "100"
26+
"platform": "Windows 10",
27+
"platformName": "Windows 10",
28+
"version": "101",
29+
"browserVersion": "101"
3030
}
3131
],
3232
"edge": [
@@ -55,8 +55,8 @@
5555
"browserName": "MicrosoftEdge",
5656
"platform": "Windows 10",
5757
"platformName": "Windows 10",
58-
"version": "100",
59-
"browserVersion": "100"
58+
"version": "101",
59+
"browserVersion": "101"
6060
}
6161
],
6262
"safari": [
@@ -92,7 +92,7 @@
9292
{
9393
"browserName": "firefox",
9494
"platform": "Windows 10",
95-
"version": "100"
95+
"version": "101"
9696
}
9797
],
9898
"android": [

tools/scripts/diff-sizes.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ function generateDiffRows (assetSizes, buildType) {
115115
diffSizesResults = `-${Math.round(((1 - diffSizes.fileSizePercent) + Number.EPSILON) * 10000) / 100}%`
116116
}
117117
if (diffSizes.gzipSizePercent > 1) {
118-
diffSizesResults = `${diffSizesResults} / + ${Math.round(((diffSizes.gzipSizePercent - 1) + Number.EPSILON) * 10000) / 100}% (gzip)`
118+
diffSizesResults = `${diffSizesResults} / +${Math.round(((diffSizes.gzipSizePercent - 1) + Number.EPSILON) * 10000) / 100}% (gzip)`
119119
} else {
120-
diffSizesResults = `${diffSizesResults} / - ${Math.round(((1 - diffSizes.gzipSizePercent) + Number.EPSILON) * 10000) / 100}% (gzip)`
120+
diffSizesResults = `${diffSizesResults} / -${Math.round(((1 - diffSizes.gzipSizePercent) + Number.EPSILON) * 10000) / 100}% (gzip)`
121121
}
122122

123123
return `|${assetName.name}|${releaseSizesResult}|${buildSizesResult}|${diffSizesResults}|`

webpack.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ if (PR_NAME) console.log('PR_NAME', PR_NAME)
8282
const instantiateSourceMapPlugin = (filename) => {
8383
return new webpack.SourceMapDevToolPlugin({
8484
append: MAP_PATH, // sourceMappingURL CDN route vs local route (for sourceMappingURL)
85-
filename: filename || (SUBVERSION === 'PROD' ? '[name].[chunkhash:8].map' : '[name].map'),
85+
filename: filename || (['PROD', 'DEV', 'CURRENT'].includes(SUBVERSION) ? '[name].[chunkhash:8].map' : '[name].map'),
8686
...(JSON.parse(SOURCEMAPS) === false && { exclude: new RegExp('.*') }) // Exclude all files if disabled.
8787
})
8888
}
@@ -128,7 +128,7 @@ const commonConfig = {
128128
},
129129
output: {
130130
filename: '[name].js',
131-
chunkFilename: SUBVERSION === 'PROD' ? `[name].[chunkhash:8]${PATH_VERSION}.min.js` : `[name]${PATH_VERSION}.js`,
131+
chunkFilename: ['PROD', 'DEV', 'CURRENT'].includes(SUBVERSION) ? `[name].[chunkhash:8]${PATH_VERSION}.min.js` : `[name]${PATH_VERSION}.js`,
132132
path: path.resolve(__dirname, './build'),
133133
publicPath: PUBLIC_PATH, // CDN route vs local route (for linking chunked assets)
134134
clean: false
@@ -186,6 +186,7 @@ const standardConfig = merge(commonConfig, {
186186
]
187187
},
188188
plugins: [
189+
instantiateSourceMapPlugin(),
189190
...instantiateBundleAnalyzerPlugin('standard')
190191
],
191192
target: 'web'
@@ -243,12 +244,12 @@ const polyfillsConfig = merge(commonConfig, {
243244
* overwrite with either an ES5 or ES6 target. For differentiated transpilation of dynamically loaded dependencies
244245
* in non-production builds, we can tag output filenames for chunks of the polyfills bundle with `-es5`.
245246
*/
246-
chunkFilename: SUBVERSION === 'PROD' ? `[name].[chunkhash:8]-es5${PATH_VERSION}.min.js` : `[name]-es5${PATH_VERSION}.js`
247+
chunkFilename: ['PROD', 'DEV', 'CURRENT'].includes(SUBVERSION) ? `[name].[chunkhash:8]-es5${PATH_VERSION}.min.js` : `[name]-es5${PATH_VERSION}.js`
247248
},
248249
plugins: [
249250
...instantiateBundleAnalyzerPlugin('polyfills'),
250251
// Source map outputs must also must be tagged to prevent standard/polyfill filename collisions in non-production.
251-
instantiateSourceMapPlugin(SUBVERSION === 'PROD' ? '[name].[chunkhash:8].map' : '[name]-es5.map')
252+
instantiateSourceMapPlugin(['PROD', 'DEV', 'CURRENT'].includes(SUBVERSION) ? '[name].[chunkhash:8]-es5.map' : '[name]-es5.map')
252253
],
253254
target: 'browserslist:ie >= 11' // Applies to webpack's own runtime output; babel-loader only impacts bundled modules.
254255
})

0 commit comments

Comments
 (0)