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

[[email protected]]: The hbs plugin doesn't forward the options parameter to this.resolve #2236

Open
abeforgit opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2237
Open

[[email protected]]: The hbs plugin doesn't forward the options parameter to this.resolve #2236

abeforgit opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2237

Comments

@abeforgit
Copy link

abeforgit commented Jan 26, 2025

I (have to) use the commonjs rollup plugin for my addon, and I'm getting the following warning in my build output:

[plugin commonjs--resolver] It appears a plugin has implemented a "resolveId" hook that uses "this.resolve" without forwarding the third "options" parameter of "resolveId". This is problematic as it can lead to wrong module resolutions especially for the node-resolve plugin and in certain cases cause early exit errors for the commonjs plugin.
In rare cases, this warning can appear if the same file is both imported and required from the same mixed ES/CommonJS module, in which case it can be ignored.

Looking at https://github.com/embroider-build/embroider/blob/main/packages/addon-dev/src/rollup-hbs-plugin.ts that seems to be the case indeed.
It doesn't seem to be causing any issues for me, but it seems like a very easy fix. I'll make a pr for it as well.

some reference info from rollup's maintainer: lightyen/typescript-paths#3 (comment)

@abeforgit abeforgit reopened this Jan 26, 2025
@abeforgit abeforgit linked a pull request Jan 26, 2025 that will close this issue
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 a pull request may close this issue.

1 participant