File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
+ ## 5.0.1
4
+
5
+ * #1349 Fix issue between ` Encore.enableIntegrityHashes() ` and filenames with a query-string (@Kocal )
6
+
3
7
## 5.0.0
4
8
5
9
This is a new major version that contains several backwards-compatibility breaks.
Original file line number Diff line number Diff line change @@ -95,9 +95,12 @@ class EntryPointsPlugin {
95
95
for ( const entryName in manifest . entrypoints ) {
96
96
for ( const fileType in manifest . entrypoints [ entryName ] ) {
97
97
for ( const asset of manifest . entrypoints [ entryName ] [ fileType ] ) {
98
+ if ( asset in manifest . integrity ) {
99
+ continue ;
100
+ }
101
+
98
102
// Drop query string if any
99
103
const assetNormalized = asset . includes ( '?' ) ? asset . split ( '?' ) [ 0 ] : asset ;
100
-
101
104
if ( assetNormalized in manifest . integrity ) {
102
105
continue ;
103
106
}
@@ -118,7 +121,7 @@ class EntryPointsPlugin {
118
121
fileHashes . push ( `${ algorithm } -${ hash . digest ( 'base64' ) } ` ) ;
119
122
}
120
123
121
- manifest . integrity [ assetNormalized ] = fileHashes . join ( ' ' ) ;
124
+ manifest . integrity [ asset ] = fileHashes . join ( ' ' ) ;
122
125
}
123
126
}
124
127
}
Original file line number Diff line number Diff line change @@ -3139,9 +3139,9 @@ module.exports = {
3139
3139
testSetup . runWebpack ( config , ( webpackAssert ) => {
3140
3140
const integrityData = getIntegrityData ( config ) ;
3141
3141
const expectedFilesWithHashes = [
3142
- '/build/runtime.js' ,
3143
- '/build/main.js' ,
3144
- '/build/styles.css' ,
3142
+ '/build/runtime.js?v=20a50360a1782493 ' ,
3143
+ '/build/main.js?v=916b1472d0bc8258 ' ,
3144
+ '/build/styles.css?v=4f61639dd8b6c51f ' ,
3145
3145
] ;
3146
3146
3147
3147
expectedFilesWithHashes . forEach ( ( file ) => {
You can’t perform that action at this time.
0 commit comments