unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more

Home Page:https://unplugin.unjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack behavior incorrectly assumes the starting directory for resolving files is the users current working directory

NullVoxPopuli opened this issue · comments

Environment

I already put up a PR with info here: #374

unplugin: ^1.10.0
node: 18.19.0

Reproduction

https://github.com/NullVoxPopuli/embroider-3--unplugin-plugin-loads-app-files

initial report (with a lot more details): embroider-build/embroider#1843 (embroider for all intents and purposes of this bug report is a webpack plugin)

Describe the bug

the webpack plugin assumes that the resolving should happen from the user's CWD -- but an alternate CWD may be used in some environments, causing resolution of files to fail.

Additional context

No response

Logs

See: https://github.com/embroider-build/embroider/issues/1843