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

Resolve GLSL relative to the importer, not the asset #7263

Merged
merged 2 commits into from
Nov 8, 2021

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Nov 7, 2021

With index.js imports a.glsl imports sub/a.glsl imports sub/b.glsl,
the last import (using require(./b)) should be relative to sub, not asset.filePath (which is in the parent folder.

Closes #7253

@height
Copy link

height bot commented Nov 7, 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.

@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.97s -12.00ms
Cached 302.00ms +10.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 582.00ms -46.00ms 🚀
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 583.00ms -45.00ms 🚀
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 583.00ms -45.00ms 🚀

Cached Bundles

No bundle changes detected.

React HackerNews ✅

Timings

Description Time Difference
Cold 10.53s +405.00ms
Cached 482.00ms -10.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/index.js 487.12kb +620.00b ⚠️ 5.61s +158.00ms

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 487.12kb +620.00b ⚠️ 5.82s +219.00ms

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.13m +731.00ms
Cached 1.77s +8.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/heading4.094fd60f.js 1.27kb +0.00b 20.98s -10.43s 🚀

Three.js ✅

Timings

Description Time Difference
Cold 7.09s +34.00ms
Cached 398.00ms +3.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 3ed2dac into v2 Nov 8, 2021
@devongovett devongovett deleted the 7253-glsl-relative branch November 8, 2021 14:15
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)
  ...
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.

GLSL transformer fails to find nested vendor dependencies (works in v1, fails in v2)
3 participants