-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use entrypoint chunk instead of runtime chunk
This results in the asset files being named after the entry points, instead of the runtime chunk when using `runtimeChunk = 'single'`. Fixes #24352
- Loading branch information
1 parent
051f187
commit 03149f9
Showing
5 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/dependency-extraction-webpack-plugin/test/fixtures/runtime-chunk-single/a.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { isBlobURL } from '@wordpress/blob'; | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
import atob from 'atob'; | ||
|
||
isBlobURL( '' ); | ||
atob( 'SGVsbG8sIFdvcmxkIQ==' ); |
11 changes: 11 additions & 0 deletions
11
packages/dependency-extraction-webpack-plugin/test/fixtures/runtime-chunk-single/b.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { isBlobURL } from '@wordpress/blob'; | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
import _ from 'lodash'; | ||
|
||
_.isEmpty( isBlobURL( '' ) ); |
15 changes: 15 additions & 0 deletions
15
...dependency-extraction-webpack-plugin/test/fixtures/runtime-chunk-single/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
const DependencyExtractionWebpackPlugin = require( '../../..' ); | ||
|
||
module.exports = { | ||
entry: { | ||
a: './a', | ||
b: './b', | ||
}, | ||
plugins: [ new DependencyExtractionWebpackPlugin() ], | ||
optimization: { | ||
runtimeChunk: 'single', | ||
}, | ||
}; |