err Error: Default condition should be last one
ergodic1 opened this issue · comments
While building an app using pixi.js using next, storybook and webpack, I encountered the helpful error err Error: Default condition should be last one
emitted as part of the webpack compilation process with no references to files.
Investigating, it was suggested on some github issues it was to do with the order of items in package.json:
"import": {
"default": "./index.mjs",
"types": "./index.d.ts"
}
Instead of the suggested order:
"import": {
"types": "./index.d.ts",
"default": "./index.mjs"
}
I managed to find out that @pixi/color was the culprit, so just followed a hunch and searched every plugin it loadeds source and found colord
. Changing the order of the values in the package.json sorted the issue.
Is this something that can be fixed here? I have no idea of whether this is going to cause other issues, but thought I would ask.