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

err Error: Default condition should be last one #111

Open
ergodic1 opened this issue Sep 25, 2023 · 0 comments
Open

err Error: Default condition should be last one #111

ergodic1 opened this issue Sep 25, 2023 · 0 comments

Comments

@ergodic1
Copy link

ergodic1 commented Sep 25, 2023

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.

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

No branches or pull requests

1 participant