Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

4.0.0 Dependency bundled as two separate instances in production build #2025

Open
draoncc opened this issue Oct 12, 2021 · 0 comments
Open

Comments

@draoncc
Copy link

draoncc commented Oct 12, 2021

Minimal example project: https://github.com/draoncc/FuseBox-GraphQL-Apollo-CoreSchema-issue-example

Run yarn build, followed by node dist/app.js. It should print a GraphQLErrorExt. The issue is that only one instance of "graphql" may be bundled, but when inspecting dist/app.js, graphql seems to be imported twice:

L32  var graphql_1 = __fusereq(3);
L107 var graphql_mjs_1 = __fusereq(11);

The only solution seems to be to add "graphql" to the list of ignored dependencies in FuseBox' configuration, and installing it separately.

How come graphql is imported as two separate instances instead of one, and is this preventable?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant