Is there a way to pick which build of a dependency to use?
I'm using node to build my webapp. One of the packages I depend on is tippy.js. When I import it with
npm i tippy.js
, it puts all these files in my node_modules directory (see screenshot).
I'm not sure why, but when I build my project it ends up using one of the files meant for node. How do I get my build to use the version meant for frontend instead (I think that would be any version with umd
in its name)?
My project is written in typescript, I build with npm
and rollup
. It would help me a lot just to know which of these tools I need to learn more of in order to find the solution.3 Replies
I'm guessing the answer lies somewhere in the
package.json
, but nothing has really stood out to me when I read the NPM documentation about it🤔 have you tried moving it to a "dev dependency"? What really matters is what you get when you build.
I'm going to guess that what is bundled is needed though. You can configure rollup to not include the map files in you bundle etc.
I have but that doesn't help because it still creates issues when my test runs