-
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.
Dependency Extraction: output asset.php files for shared chunks too (#…
…41002) * Add new test case for project with CSS modules * Dependency Extraction: output asset.php files for shared chunks too * Add CHANGELOG entry Co-authored-by: Grzegorz Ziolkowski <[email protected]>
- Loading branch information
Showing
7 changed files
with
141 additions
and
99 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
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
16 changes: 16 additions & 0 deletions
16
packages/dependency-extraction-webpack-plugin/test/fixtures/style-imports/index.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,16 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { isBlobURL } from '@wordpress/blob'; | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
import _ from 'lodash'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import './style.css'; | ||
|
||
_.isEmpty( isBlobURL( '' ) ); |
1 change: 1 addition & 0 deletions
1
packages/dependency-extraction-webpack-plugin/test/fixtures/style-imports/style.css
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 @@ | ||
body { color: white; } |
31 changes: 31 additions & 0 deletions
31
packages/dependency-extraction-webpack-plugin/test/fixtures/style-imports/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,31 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
const MiniCSSExtractPlugin = require( 'mini-css-extract-plugin' ); | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
const DependencyExtractionWebpackPlugin = require( '../../..' ); | ||
|
||
module.exports = { | ||
plugins: [ | ||
new DependencyExtractionWebpackPlugin(), | ||
new MiniCSSExtractPlugin(), | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
{ | ||
loader: MiniCSSExtractPlugin.loader, | ||
}, | ||
{ | ||
loader: require.resolve( 'css-loader' ), | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}; |