Closed NullVoxPopuli closed 2 months ago
Unplugin incorrectly assumes that the app is always at process.cwd()
. But in webpack, the app in general is at options.context
.
Here is a fully-working version of your repro with a patch applied to unplugin: https://github.com/NullVoxPopuli/embroider-3--unplugin-plugin-loads-app-files/pull/1
oh dang nice, thanks! I'll copy that patch over to a PR to unplugin :tada:
Repro here: https://github.com/NullVoxPopuli/embroider-3--unplugin-plugin-loads-app-files
My virtual file is basically this:
and when I use it:
I get a build time error:
full report
``` ================================================================================= ENV Summary: TIME: Fri Mar 15 2024 10:08:28 GMT-0400 (Eastern Daylight Time) TITLE: ember ARGV: - π /.volta/tools/image/node/18.19.0/bin/node -and my first idea was to use the module path, not
./
, so I changed my test virtual text to:but that results in what appears to be the same error
full report
``` ================================================================================= ENV Summary: TIME: Fri Mar 15 2024 10:13:29 GMT-0400 (Eastern Daylight Time) TITLE: ember ARGV: - π /.volta/tools/image/node/18.19.0/bin/node -Issue is the same on v3 and main. with any extension for the import, it seems, js, hbs, no extension
when debugging, we can see that it is the virtual file trying to access an app file:
what's goofy though, is that the
request.isVirtual
flag is set to false. is this a troll? or is it used for something else :sweat_smile: an actual bug with that flag? idk