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 side effects glob matching #7288

Merged
merged 2 commits into from
Nov 12, 2021
Merged

Fix side effects glob matching #7288

merged 2 commits into from
Nov 12, 2021

Conversation

mischnic
Copy link
Member

↪️ Pull Request

Closes #7239 (comment)

sideEffects matching now behaves like Webpack: https://github.com/webpack/webpack/blob/main/lib/optimize/SideEffectsFlagPlugin.js

sideEffects is either a boolean (which should be clear) or a list of globs that match all not side-effect-free files where:

  • every entry has an implicit leading ./. So "src/index.js" is equivalent to "./src/index.js" except for
  • entrys not containing a slash (e.g. "index.js" which is equivalent to **/index.js) so that matches all files in the package with that name.

It appears that Rollup doesn't have this last rule:

@height
Copy link

height bot commented Nov 11, 2021

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@mischnic mischnic changed the title Side effects glob matching Fix side effects glob matching Nov 11, 2021
@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.74s +17.00ms
Cached 260.00ms -7.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 563.00ms +48.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 564.00ms +49.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 563.00ms +48.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 9.06s +32.00ms
Cached 420.00ms -9.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 58.78s -854.00ms
Cached 1.57s -11.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/EmojiPickerComponent.07ae4435.js 147.12kb +0.00b 27.73s +9.59s ⚠️
dist/esm.f1a592e5.js 33.15kb +0.00b 27.73s +9.59s ⚠️
dist/DatePicker.f2994e45.js 22.98kb +0.00b 27.73s +9.59s ⚠️
dist/js.660b75db.js 17.25kb +0.00b 44.45s +10.45s ⚠️
dist/png-chunks-extract.5c9c0fb9.js 3.58kb +0.00b 44.45s +10.45s ⚠️
dist/feedback.c7e69064.js 1.77kb +0.00b 27.73s +9.59s ⚠️
dist/workerHasher.3639b1f9.js 1.63kb +0.00b 27.73s +9.59s ⚠️
dist/heading6.a693146e.js 1.51kb +0.00b 27.73s +9.60s ⚠️
dist/heading5.8bfafe21.js 1.38kb +0.00b 27.73s +9.60s ⚠️
dist/expand.a44d10fe.js 1.29kb +0.00b 27.73s +9.59s ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/heading4.094fd60f.js 1.27kb +0.00b 27.83s +9.36s ⚠️

Three.js ✅

Timings

Description Time Difference
Cold 6.20s -68.00ms
Cached 341.00ms -16.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@devongovett devongovett merged commit f651829 into v2 Nov 12, 2021
@devongovett devongovett deleted the side-effects-glob-matching branch November 12, 2021 14:36
lettertwo added a commit that referenced this pull request Nov 15, 2021
* v2: (68 commits)
  Fix RangeError in `not export` error with other file type (#7295)
  Apply sourcemap in @parcel/transformer-typescript-tsc (#7287)
  Fix side effects glob matching (#7288)
  Fix changelog headings
  v2.0.1
  Changelog for v2.0.1
  Resolve GLSL relative to the importer, not the asset (#7263)
  fix: add @parcel/diagnostic as dependency of @parcel/transformer-typescript-types (#7248)
  Fixed missing "Parcel" export member in Module "@parcel/core" (#7250)
  Add script to sync engines with core version (#7207)
  Bump swc (#7216)
  Make Webpack loader detection regex dramatically faster (#7226)
  swc optimizer (#7212)
  Update esbuild in optimizer (#7233)
  Properly visit member expressions (#7228)
  Update to prettier 2 (#7209)
  Fix serve mode with target override and target source fields (#7187)
  Update package.json to include the repository (#7184)
  fix #6730: add transformer-raw as dependency of config-webextension (#7193)
  Log warning instead of crash if image optimizer fails (#7119)
  ...
lettertwo added a commit that referenced this pull request Nov 15, 2021
* v2:
  Fix RangeError in `not export` error with other file type (#7295)
  Apply sourcemap in @parcel/transformer-typescript-tsc (#7287)
  Fix side effects glob matching (#7288)
  Fix changelog headings
  v2.0.1
  Changelog for v2.0.1
  Resolve GLSL relative to the importer, not the asset (#7263)
  fix: add @parcel/diagnostic as dependency of @parcel/transformer-typescript-types (#7248)
  Fixed missing "Parcel" export member in Module "@parcel/core" (#7250)
lettertwo added a commit that referenced this pull request Nov 15, 2021
* v2: (68 commits)
  Fix RangeError in `not export` error with other file type (#7295)
  Apply sourcemap in @parcel/transformer-typescript-tsc (#7287)
  Fix side effects glob matching (#7288)
  Fix changelog headings
  v2.0.1
  Changelog for v2.0.1
  Resolve GLSL relative to the importer, not the asset (#7263)
  fix: add @parcel/diagnostic as dependency of @parcel/transformer-typescript-types (#7248)
  Fixed missing "Parcel" export member in Module "@parcel/core" (#7250)
  Add script to sync engines with core version (#7207)
  Bump swc (#7216)
  Make Webpack loader detection regex dramatically faster (#7226)
  swc optimizer (#7212)
  Update esbuild in optimizer (#7233)
  Properly visit member expressions (#7228)
  Update to prettier 2 (#7209)
  Fix serve mode with target override and target source fields (#7187)
  Update package.json to include the repository (#7184)
  fix #6730: add transformer-raw as dependency of config-webextension (#7193)
  Log warning instead of crash if image optimizer fails (#7119)
  ...
JonasDoesThings added a commit to nxt3AT/sankeydiagram.net that referenced this pull request Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parcel build breaking tfjs initialization logic (that works under parcel serve)
3 participants