Webpack/rspack call load and transform with escaped paths
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, webpack
- Domain
- build-system
Research direction
Start with the hash-path reproduction in test/fixtures/hash-path/unplugin.js and review PR #592 for the proposed scope. Trace how the webpack loader in dist/webpack/loaders/load.mjs passes the escaped path to load and transform, then use the fixture's assertUnescapedId checks to verify that both helpers receive usable paths.
Written by the indexing model from the issue text.
Description
Environment
unplugin 3.1.0
Reproduction
See PR #592. Without the changes to src, added test fails with message:
Error: load received escaped id: "C:\\Users\\edemaine\\Projects\\unplugin\\test\\fixtures\\hash-path\\src\\msg\u0000#hash.js"
at assertUnescapedId (C:\Users\edemaine\Projects\unplugin\test\fixtures\hash-path\unplugin.js:11:11)
at Object.load (C:\Users\edemaine\Projects\unplugin\test\fixtures\hash-path\unplugin.js:33:7)
at Object.load (file:///C:/Users/edemaine/Projects/unplugin/dist/webpack/loaders/load.mjs:14:28)
at LOADER_EXECUTION (C:\Users\edemaine\Projects\unplugin\node_modules\.pnpm\loader-runner@4.3.1\node_modules\loader-runner\lib\LoaderRunner.js:195:14)
at runSyncOrAsync (C:\Users\edemaine\Projects\unplugin\node_modules\.pnpm\loader-runner@4.3.1\node_modules\loader-runner\lib\LoaderRunner.js:196:5)
at iterateNormalLoaders (C:\Users\edemaine\Projects\unplugin\node_modules\.pnpm\loader-runner@4.3.1\node_modules\loader-runner\lib\LoaderRunner.js:258:2)
at processResourceCallback (C:\Users\edemaine\Projects\unplugin\node_modules\.pnpm\loader-runner@4.3.1\node_modules\loader-runner\lib\LoaderRunner.js:282:5)
at Object.processResource (C:\Users\edemaine\Projects\unplugin\node_modules\.pnpm\webpack@5.104.1_esbuild@0.27.2_webpack-cli@6.0.1\node_modules\webpack\lib\NormalModule.js:1094:14)
Describe the bug
Webpack for example escapes # in paths into \0#. These paths get passed into load and transform helpers, which makes it hard to actually load the file in a cross-platform way.
Additional context
No response
Logs
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from unjs/unplugin
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement pr welcome
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·