Closed jbalsas closed 6 years ago
I would say to ship a version which works in the browser (the developer will add it to Karma files
) in addition to the node version would be the golden middle.
I agree that it's annoying, but since we already face this same problem with metal in general I don't see it as a huge deal.
We're already in the place where the only real way to use metal core is with some kind of bundler.
Closing this since we figured out the issues on the https://github.com/wedeploy/wedeploy-sdk-js.
Moving our parse logic to url-parse has the side-effect of a less-than-ideal necessary build step or setup.
Someone consuming it needs to be aware of how to build it. There might be several scenarios:
Webpack / Rollup / Browserify build
This is expected to work as the bundling tools already know how to deal with the different dependencies
Karma config setup
Currently, a very barebone setup for testing modules consuming
metal-*
dependencies looked like this:A project depending on
metal-uri
would now likely need to addbrowserify
and serve additional files such asnode_modules/url-parse
(and transitive dependencies) or serve and preprocess everything insidenode_modules
just to be sure.While I guess we would all agree this is not the ideal scenario, what options do we have? Should we:
metal-uri
to be consumed directly in the browserparse
implementation back into the module@eduardolundgren, @ipeychev, @Robert-Frampton, thoughts?