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

chore: bump css-loader and style-loader #21225

Closed
wants to merge 1 commit into from
Closed

chore: bump css-loader and style-loader #21225

wants to merge 1 commit into from

Conversation

ludofischer
Copy link
Contributor

Prepare the ground for making use of new features like named exports: #14704

Might help with the inlining difficulties in #21127: according to the yarn.lock diff, this change alredy removes duplicate postcss packages.

* disable esModule mode in style-loader to preserve the old behaviour.
* css-loader changelog: https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md
* style-loader changelog: https://github.com/webpack-contrib/style-loader/releases

Prepare the ground for making use of new features like named exports: #14704

Might help with the inlining difficulties in #21127:
according to the yarn.lock diff, this change alredy removes duplicate postcss packages.
@ijjk
Copy link
Member

ijjk commented Jan 16, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ludofischer/next.js bump-css-loader Change
buildDuration 10.2s 9.6s -603ms
nodeModulesSize 77.5 MB 78.7 MB ⚠️ +1.17 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ludofischer/next.js bump-css-loader Change
/ failed reqs 0 0
/ total time (seconds) 1.937 1.931 -0.01
/ avg req/sec 1290.74 1294.46 +3.72
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.202 1.232 ⚠️ +0.03
/error-in-render avg req/sec 2079.78 2029.67 ⚠️ -50.11
Client Bundles (main, webpack, commons)
vercel/next.js canary ludofischer/next.js bump-css-loader Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-712e20f..aa05.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ludofischer/next.js bump-css-loader Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary ludofischer/next.js bump-css-loader Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary ludofischer/next.js bump-css-loader Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary ludofischer/next.js bump-css-loader Change
index.html gzip 615 B 615 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary ludofischer/next.js bump-css-loader Change
buildDuration 12.1s 11.2s -881ms
nodeModulesSize 77.5 MB 78.7 MB ⚠️ +1.17 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary ludofischer/next.js bump-css-loader Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-712e20f..aa05.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ludofischer/next.js bump-css-loader Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary ludofischer/next.js bump-css-loader Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary ludofischer/next.js bump-css-loader Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary ludofischer/next.js bump-css-loader Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.18 MB 5.18 MB
Commit: 395de08

@ijjk
Copy link
Member

ijjk commented Jan 16, 2021

Failing test suites

Commit: 395de08

test/acceptance/ReactRefreshLogBox.dev.test.js

  • css syntax errors

  • scss syntax errors

Expand output

● css syntax errors

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `css syntax errors 1`

- Snapshot  - 1
+ Received  + 1

  ./index.module.css:1:1
- Syntax error: Selector "button" is not pure (pure selectors must contain at least one local class or id)
+ Syntax error: /home/runner/work/next.js/next.js/test/acceptance/__tmp__/dtGK12INcu9p1LreY0-rA/index.module.css Selector "button" is not pure (pure selectors must contain at least one local class or id)

  > 1 | button {}
      |         ^

  823 |   expect(await session.hasRedbox(true)).toBe(true)
  824 |   const source2 = await session.getRedboxSource()
> 825 |   expect(source2).toMatchInlineSnapshot(`
      |                   ^
  826 |     "./index.module.css:1:1
  827 |     Syntax error: Selector \\"button\\" is not pure (pure selectors must contain at least one local class or id)
  828 | 

  at Object.<anonymous> (acceptance/ReactRefreshLogBox.dev.test.js:825:19)

● scss syntax errors

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `scss syntax errors 2`

- Snapshot  - 1
+ Received  + 1

  ./index.module.scss:1:1
- Syntax error: Selector "button" is not pure (pure selectors must contain at least one local class or id)
+ Syntax error: /home/runner/work/next.js/next.js/packages/next/index.module.scss Selector "button" is not pure (pure selectors must contain at least one local class or id)

  > 1 | button { font-size: 5px; }
      |                          ^

  870 |   expect(await session.hasRedbox(true)).toBe(true)
  871 |   const source2 = await session.getRedboxSource()
> 872 |   expect(source2).toMatchInlineSnapshot(`
      |                   ^
  873 |     "./index.module.scss:1:1
  874 |     Syntax error: Selector \\"button\\" is not pure (pure selectors must contain at least one local class or id)
  875 | 

  at Object.<anonymous> (acceptance/ReactRefreshLogBox.dev.test.js:872:19)

@ludofischer
Copy link
Contributor Author

Closing this as it actually makes the bundle size worse.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants