auto-externalize peer deps #889
kevinbarabash
started this conversation in
General
Replies: 1 comment 1 reply
-
Since Snowpack is for building websites, peer dependencies are meant to be included in the dependencies that Snowpack installs so that wonder-blocks-button can use them on the frontend. Otherwise, they wouldn't be accessible on your website. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that peerDependencies are included in the bundles that
rollup
generates. I tried adding the following to my snowpack.config.js:Unfortunately, it doesn't seem to work as expected:
The package.json for
@khanacademy/wonder-blocks-button
hasreact
andreact-dom
both marked as peerDependencies. It also has a couple of other modules marked as peerDependencies (aphrodite
andreact-router-dom
) which aren't showing up in the output list.I was hoping snowpack/rollup would generate web modules for all four of these dependencies. As it stands though all of the peer deps are still being included in wonder-blocks-button.js.
Beta Was this translation helpful? Give feedback.
All reactions