-
Notifications
You must be signed in to change notification settings - Fork 142
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 issue with paired component between app and addon #2110
Conversation
dba3110
to
572989e
Compare
a8e1235
to
8a3bbe7
Compare
8a3bbe7
to
0cbfaf9
Compare
Thanks, I'm going to run your updated tests without the fix to try to understand this case better. |
@ef4 i'm hitting this in another project where im testing vite as well. its because it has .hbs as an entry point and vite wants to scan it for imports |
i removed the length check so it also allows for other user plugins |
Using the tests here I see what vite is doing. It's trying to use esbuild to parse a dep's entrypoint when the dep isn't JS, so it needs to load all your custom config, so our resolver gets pulled in. I think we can avoid this whole situation by moving a little bit of work into stage1 instead. V2 addons are already not allowed to use non-JS files, the only reason vite is encountering some is that we were intentionally lax with auto-upgraded v1 addons. |
It might fix this specific case. But the user could add his own esbuild plugins for his own custom dependency. And the check would then throw the error |
But that would probably also fix #2119 ? |
error:
ERROR: [plugin: embroider-esbuild-resolver] cannot identify what phase vite is in. Saw plugins: embroider-esbuild-resolver
not sure why this setup triggers this. But there is a vite esbuild mode where vite does not add any plugins here:
https://github.com/vitejs/vite/blob/ba56cf43b5480f8519349f7d7fe60718e9af5f1a/packages/vite/src/node/optimizer/index.ts#L1065