Open guillaumebrunerie opened 1 week ago
This plugin does not yet support exports
, until resolve
does.
Ideally, the package would keep the LHS and RHS of "exports" the same, so that it gracefully degrades - otherwise until resolve (and thus, us) adds support for exports
, you'd need to add the package to the ignored imports setting.
In what way does resolve
not support exports
?
I tried to run require.resolve("pixi.js/advanced-blend-modes")
in the node REPL in the root directory of my project, and got the expected result: [...]/node_modules/pixi.js/lib/advanced-blend-modes/init.js
.
in any way - i'm talking about https://npmjs.com/resolve
With PixiJS v8, advanced blend modes are imported as follows (see for instance https://pixijs.com/8.x/examples/basic/blend-modes):
However, this triggers the lint error
Unable to resolve path to module 'pixi.js/advanced-blend-modes'. [import/no-unresolved]
.Here is the (I think) relevant part of PixiJS's package.json (seems correct to me, but I don’t know much about those things):
Note that if I write the following:
then the lint error goes away, but the import itself doesn’t work anymore, I get the following error from Vite:
I'm not sure if it’s an issue in
eslint-plugin-import
, in PixiJS, or if I misconfigured something? I’m using ESLint 8.57 with a.eslintrc
and"type": "module"
in mypackage.json
.