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(webpack): avoid grouping with default name #7808

Merged
merged 8 commits into from Jul 30, 2020
Merged

fix(webpack): avoid grouping with default name #7808

merged 8 commits into from Jul 30, 2020

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jul 29, 2020

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Fixes #7795 by letting webpack to use computed cache group key.

Related:

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@pi0 pi0 marked this pull request as draft July 29, 2020 16:34
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2020

Codecov Report

Merging #7808 into dev will increase coverage by 0.02%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #7808      +/-   ##
==========================================
+ Coverage   68.86%   68.89%   +0.02%     
==========================================
  Files          90       90              
  Lines        3835     3835              
  Branches     1037     1037              
==========================================
+ Hits         2641     2642       +1     
+ Misses        970      969       -1     
  Partials      224      224              
Flag Coverage Δ
#unittests 68.89% <42.85%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/config/src/config/build.js 100.00% <ø> (ø)
packages/webpack/src/config/client.js 62.35% <42.85%> (+1.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a4aacc...e9f60c3. Read the comment docs.

@pi0 pi0 requested a review from clarkdo July 29, 2020 17:16
@pi0
Copy link
Member Author

pi0 commented Jul 29, 2020

I did a bunch of tests to ensure this fix is not causing dot file issue and webpack's default [name] function (src) returns to fallback to use default key still would be nice if we can beta test it on nuxt-edge to ensure not introducing dotfile bug again /cc @danielroe @aldarund @simllll @husayt

Copy link
Member

@clarkdo clarkdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an exmaple about what the new output dirs and files would be ?

@pi0
Copy link
Member Author

pi0 commented Jul 29, 2020

For #7795 reproduction:

.nuxt/dist/client
├── app.97f1f0a.js
├── LICENSES
├── pages
│   └── index.d590496.js
├── runtime.d718bc0.js
└── vendors
    ├── commons.15ff78a.js
    └── pages
        └── index.dba88f0.js

With a vendor shared between two pages:

├── app.52c70b1.js
├── LICENSES
├── pages
│   ├── foo.56fb624.js
│   └── index.e9174bf.js
├── runtime.b2c0774.js
└── vendors
    ├── commons.4e61828.js
    └── foo~index.f8232e7.js

Bud sadly (or happily :D) no simple reproduction for dotfile issue happened in previous releases

@danielroe
Copy link
Member

danielroe commented Jul 29, 2020

I have projects that can replicate both issues so will test.

EDIT: this solves both problems for me (both dotfile prefixed JS files and #7795).

package.json Outdated Show resolved Hide resolved
@simllll
Copy link

simllll commented Jul 29, 2020

Will test it tomorrow!

@simllll
Copy link

simllll commented Jul 30, 2020

Will test it tomorrow!

Just tested it with nuxt-next in two of our applications that were affected by the . bug before. Looks good to me! Everything seems to work!

@pi0
Copy link
Member Author

pi0 commented Jul 30, 2020

Update

├── app.37f7ad3.js
├── LICENSES
├── node_modules
│   ├── commons.99cd09c.js
│   └── foo~index.c1279c0.js
├── pages
│   ├── foo.f8abb2f.js
│   └── index.2145558.js
└── runtime.a01e42c.js
├── 8.2c45d44.js
├── 9.5bc15af.js
├── app.39cf246.js
├── commons
│   └── cat.id.sub~product.identifier.613cc2c.js
├── LICENSES
├── node_modules
│   ├── commons.ca293da.js
│   └── ef70ff52.a5d8551.js
├── pages
│   ├── _cat
│   │   └── _id
│   │       └── _sub.d9226c6.js
│   ├── index.3d29295.js
│   └── product
│       └── _identifier.e617770.js
└── runtime.735bf8b.js

@pi0 pi0 marked this pull request as ready for review July 30, 2020 11:20
@pi0 pi0 merged commit 2e1025f into dev Jul 30, 2020
@pi0 pi0 deleted the fix/7795 branch July 30, 2020 14:22
@pi0 pi0 mentioned this pull request Jul 30, 2020
@pi0 pi0 mentioned this pull request Sep 3, 2020
7 tasks
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2.14.0] Async components don't get separate bundles
6 participants