Repository navigation
[plugin-code-exporter/plugin-explorer]: exclude peer dependencies and dependencies from bundle - #3229
Conversation
🦋 Changeset detectedLatest commit: b63bb23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest changes of this PR are not available as canary, since there are no linked |
|
@B2o5T one issue here is - how do users use this plugin if they are using the CDN version of react? |
|
@acao how this was changed with the previous implementation? |
|
@B2o5T there are a few examples where users were able to use the bundled CDN build of this plugin with the CDN graphiql. Each plugin should provide an unbundled module version and a bundled cdn version, as with GraphiQL, @graphiql/toolkit and @graphiql/react. We don't have to solve this problem now, but it will lead to a regression until we fix it |
|
@acao Since a new major is coming, we can go back to this problem in case of reporting it |
|
@B2o5T Too late with my review, sorry 🙇 @acao has a good point, and I don't think the new major will solve this. Removing the bundling of dependencies breaks the CDN examples, in particular this one: https://github.com/graphql/graphiql/blob/main/packages/graphiql-plugin-explorer/examples/index.html At least the UMD build has to bundle up all dependencies, with the exception of the ones where we define globals: https://github.com/graphql/graphiql/blob/main/packages/graphiql-plugin-explorer/vite.config.ts#L23-L28 |
|
@thomasheyenbrock ok! I'll fix it |
@graphiql/plugin-explorer@graphiql/plugin-code-exporter