Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add temporary workaround to fix broken common js import of mini-css-extract-plugin #38004

Merged
merged 7 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 37 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@

- The bundled `read-pkg-up` dependency has been updated from requiring `^1.0.1` to requiring `^7.0.1` ([#37395](https://github.com/WordPress/gutenberg/pull/37395)).

### Bug Fixes

- Added temporary workaround to fix broken CommonJS import of `mini-css-extract-plugin` [#38004](https://github.com/WordPress/gutenberg/pull/38004).

## 19.2.0 (2021-11-15)

### New Features
Expand Down
9 changes: 8 additions & 1 deletion packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ const { BundleAnalyzerPlugin } = require( 'webpack-bundle-analyzer' );
const { CleanWebpackPlugin } = require( 'clean-webpack-plugin' );
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
const browserslist = require( 'browserslist' );
const MiniCSSExtractPlugin = require( 'mini-css-extract-plugin' );

/*
* Temporary workaround to fix broken CommonJS import in version 2.5.0.
* @see https://github.com/WordPress/gutenberg/issues/37992
*/
const MiniCSSExtractPlugin = require( 'mini-css-extract-plugin' ).default
? require( 'mini-css-extract-plugin' ).default
: require( 'mini-css-extract-plugin' );
const { basename, dirname, resolve } = require( 'path' );
const ReactRefreshWebpackPlugin = require( '@pmmmwh/react-refresh-webpack-plugin' );
const TerserPlugin = require( 'terser-webpack-plugin' );
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"markdownlint": "^0.23.1",
"markdownlint-cli": "^0.27.1",
"merge-deep": "^3.0.3",
"mini-css-extract-plugin": "^2.1.0",
"mini-css-extract-plugin": "^2.5.0",
"minimist": "^1.2.0",
"npm-package-json-lint": "^5.0.0",
"npm-packlist": "^3.0.0",
Expand Down