You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
Importing a component directly from an npm package, and using it as an interactive component with an ID of the same path throws build errors. For example:
importVoteAppfrom'webpack.vote'// ...<Interactiveid="webpack.vote"// or "webpack.vote/dist/vote.bundle.js"component={VoteApp}/>
I did find a workaround by specifying the full relative path:
id="./node_modules/webpack.vote"
Admittedly, this probably won't happen too often so if it's a complex or hacky fix maybe a better approach is just to document the workaround.
The text was updated successfully, but these errors were encountered:
I think I finally figured out a nice way to solve this. We can write a Babel plugin that can inject Interactive with the correct id (path). Then you would simply do <VoteApp /> and the plugin would detect when to wrap (based on state and/or handlers).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Importing a component directly from an npm package, and using it as an
interactive
component with an ID of the same path throws build errors. For example:I did find a workaround by specifying the full relative path:
Admittedly, this probably won't happen too often so if it's a complex or hacky fix maybe a better approach is just to document the workaround.
The text was updated successfully, but these errors were encountered: