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

fix(deps): update dependency mini-css-extract-plugin to v2 #54540

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 14, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mini-css-extract-plugin ^1.6.2 -> ^2.6.0 age adoption passing confidence

Release Notes

webpack-contrib/mini-css-extract-plugin

v2.6.0

Compare Source

Features
  • added baseUri option support (from entry options) (#​915) (6004d95)
2.5.3 (2022-01-25)
Bug Fixes
2.5.2 (2022-01-17)
Bug Fixes
2.5.1 (2022-01-17)
Bug Fixes

v2.5.3

Compare Source

v2.5.2

Compare Source

v2.5.1

Compare Source

v2.5.0

Compare Source

Features
2.4.7 (2022-01-13)
Bug Fixes
2.4.6 (2022-01-06)
Bug Fixes
2.4.5 (2021-11-17)
Chore
  • update schema-utils package to 4.0.0 version
2.4.4 (2021-11-04)
Bug Fixes
2.4.3 (2021-10-21)
Bug Fixes
2.4.2 (2021-10-07)
Bug Fixes
  • endless apply of loaders, leading to memory allocation failure (#​849) (94ad699)
2.4.1 (2021-10-05)
Bug Fixes

v2.4.7

Compare Source

v2.4.6

Compare Source

v2.4.5

Compare Source

v2.4.4

Compare Source

v2.4.3

Compare Source

v2.4.2

Compare Source

v2.4.1

Compare Source

v2.4.0

Compare Source

Performance
  • migrate on new API, this improves performance and memory usage a lot, you need to have at least webpack 5.52.0 (recommended latest stable), for older versions the old API will be used (except explicit enabling of the experimentalUseImportModule option)
Features
  • added support for supports() and layer() in @import at-rule (#​843) (e751080)
Bug Fixes

v2.3.0

Compare Source

Features
Bug Fixes
  • better description for async chunk options (34b65ac)
2.2.2 (2021-09-01)
Bug Fixes
  • experimentalUseImportModule works with new URL(...) syntax (cf81c4b)
2.2.1 (2021-08-31)
Bug Fixes
  • order of @import with the output.pathinfo option (#​815) (831f771)
  • source map generation with the output.pathinfo option (#​817) (f813b4c)

v2.2.2

Compare Source

v2.2.1

Compare Source

v2.2.0

Compare Source

Features
Bug Fixes
  • hmr in browser extension (3d09da1)

v2.1.0

Compare Source

Features

v2.0.0

Compare Source

NOTES

In the current release we have fixed many problems with publicPath, previously to generate relative URLs inside CSS files developers use different hacks: publicPath: '', publicPath: '../', using relative ../../ in the outputPath option for file-loader and etc. Now you don't need it anymore. Webpack v5 uses publicPath: "auto" by default, which means to always generate relative URLs, and now mini-css-extract-plugin does the same.

We strongly recommend use auto value by default (except when using CDN).

We also want to show you that the file-loader and url-loader are outdated, please migrate on Asset Modules.

⚠ BREAKING CHANGES
  • minimum supported Node.js version is 12.13.0
  • minimum supported webpack version is 5.0.0
  • the modules.namedExport option was removed, you don't need it anymore, because we respect the modules.namedExport option from css-loader, just remove it
  • the publicPath option no longer automatically adds / (trailing slash), you need to specify, you need to specify it yourself if it is absent, i.e. if you have publicPath: "/my/public/path" replace it with publicPath: "/my/public/path/"
Bug Fixes
  • generating correct relative url() for assets inside CSS files when you use publicPath: "auto" (default value)
1.6.2 (2021-06-28)
Bug Fixes
  • performance improvement
1.6.1 (2021-06-25)
Bug Fixes

Configuration

📅 Schedule: "on the first day of the month" in timezone America/Los_Angeles.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@matticbot
Copy link
Contributor

This PR modifies the release build for wpcom-block-editor

To test your changes on WordPress.com, run install-plugin.sh wpcom-block-editor renovate/mini-css-extract-plugin-2.x on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-l4k-p2

@matticbot
Copy link
Contributor

matticbot commented Jul 14, 2021

Link to live branch is being generated...
Please wait a few minutes and refresh this page.

@matticbot
Copy link
Contributor

matticbot commented Jul 14, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~194 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-main                  -482 B  (-0.0%)     -194 B  (-0.1%)
entry-login                 -482 B  (-0.1%)     -194 B  (-0.1%)
entry-gutenboarding         -482 B  (-0.0%)     -194 B  (-0.0%)
entry-domains-landing       -482 B  (-0.1%)     -194 B  (-0.1%)
entry-browsehappy           -482 B  (-0.5%)     -194 B  (-0.7%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 9aa10fa to feba49f Compare July 27, 2021 10:28
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from feba49f to e9352ef Compare August 4, 2021 18:24
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch 3 times, most recently from f1e5a09 to 57e5ff7 Compare September 1, 2021 17:41
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 57e5ff7 to 9b51284 Compare September 11, 2021 16:36
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch 2 times, most recently from c4642ce to 387e05f Compare October 7, 2021 16:23
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 387e05f to a9e549e Compare October 21, 2021 17:27
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from a9e549e to c0a7603 Compare November 4, 2021 13:05
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from c0a7603 to 25a8e83 Compare November 17, 2021 20:03
@noahtallen noahtallen force-pushed the renovate/mini-css-extract-plugin-2.x branch 2 times, most recently from f693895 to d150b9a Compare December 15, 2021 01:00
@noahtallen noahtallen requested a review from a team December 15, 2021 01:00
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 15, 2021
@scinos
Copy link
Contributor

scinos commented Dec 15, 2021

This was failing because RequireChunkCallback plugin.

The plugin in build-tools/webpack/require-chunk-callback-plugin.js injects extra runtime code, and this code includes window.__requireChunkCallback__. I don't know why, but after updating mini-css-extract-plugin, this injected code is evaluated at build time. It fails because Node sees window.__requireChunkCallback__ and throws because window doesn't exists.

I've protected it under an if to make sure window exists, but I'm not 100% convinced it's the right solution. I don't understand why this is failing now to be honest.

@jsnajdr
Copy link
Member

jsnajdr commented Dec 18, 2021

The updated mini-css-extract-plugin has a new experimental option, experimentalUseImportModule, that indeed executes the built modules for some reason. I found this PR: webpack-contrib/mini-css-extract-plugin#737

But the option should be false by default, I don't understand why module execution is suddenly happening for us.

@jsnajdr
Copy link
Member

jsnajdr commented Dec 20, 2021

So, how the experimentalUseImportModule option works is that if it's undefined, the mini-css loader will use the new module execution if the new API (this.importModule) is passed from above by a sufficiently new version of webpack:

https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/src/loader.js#L194-L196

To disable it, we'd need to configure the mini-css loader with an explicit experimentalUseImportModule: false.

Another option is to solve the non-existent window object. Either by wrapping it in an if, like @scinos did, or using globalThis instead of window in the code generated by require-chunk-callback-plugin.

@scinos
Copy link
Contributor

scinos commented Dec 22, 2021

I did some local tests and looks like the build process got 10 to 15s faster with this new version (I assume the savings come from the new experimentalUseImportModule feature).

trunk

<i> [webpack.Progress]  | 171 ms building > entries dependencies modules
<i> [webpack.Progress]  | 15 ms building > import loader ../node_modules/thread-loader/dist/cjs.js
<i> [webpack.Progress]  | 138 ms building > import loader ../node_modules/babel-loader/lib/index.js
<w> [webpack.Progress]  | 2239 ms building > entries dependencies modules
<i> [webpack.Progress]  | 11 ms building > import loader ../node_modules/mini-css-extract-plugin/dist/loader.js
<i> [webpack.Progress]  | 93 ms building > import loader ../node_modules/css-loader/dist/cjs.js
<i> [webpack.Progress]  | 11 ms building > import loader ../node_modules/postcss-loader/dist/cjs.js
<e> [webpack.Progress]  | 10302 ms building > entries dependencies modules
<e> [webpack.Progress]  | 122944 ms building > entries dependencies modules
<e> [webpack.Progress] 135938 ms building

this branch

<i> [webpack.Progress]  | 108 ms building > entries dependencies modules
<i> [webpack.Progress]  | 24 ms building > import loader ../node_modules/thread-loader/dist/cjs.js
<i> [webpack.Progress]  | 329 ms building > import loader ../node_modules/babel-loader/lib/index.js
<w> [webpack.Progress]  | 2687 ms building > entries dependencies modules
<i> [webpack.Progress]  | 49 ms building > import loader ../node_modules/css-loader/dist/cjs.js
<i> [webpack.Progress]  | 15 ms building > import loader ../node_modules/postcss-loader/dist/cjs.js
<w> [webpack.Progress]  | 6138 ms building > entries dependencies modules
<i> [webpack.Progress]  | 20 ms building > import loader ../build-tools/webpack/sections-loader.js
<e> [webpack.Progress]  | 112903 ms building > entries dependencies modules
<e> [webpack.Progress] 122285 ms building

@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch 4 times, most recently from c8a08e3 to d235993 Compare January 17, 2022 13:08
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from d235993 to 5afdaa6 Compare January 17, 2022 22:05
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 5afdaa6 to e76c3dc Compare January 25, 2022 11:06
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from e76c3dc to 9c12437 Compare February 10, 2022 21:37
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 9c12437 to c0df1e3 Compare March 1, 2022 10:23
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from c0df1e3 to 4192b0d Compare April 1, 2022 11:42
@renovate renovate bot changed the title chore(deps): update dependency mini-css-extract-plugin to v2 fix(deps): update dependency mini-css-extract-plugin to v2 Apr 23, 2022
@renovate renovate bot force-pushed the renovate/mini-css-extract-plugin-2.x branch from 4192b0d to cfad4be Compare May 3, 2022 19:53
@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit renovate/mini-css-extract-plugin-2.x on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@noahtallen noahtallen closed this Aug 3, 2023
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 3, 2023
@matticbot matticbot deleted the renovate/mini-css-extract-plugin-2.x branch August 3, 2023 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants