Feature #5011
open
Bundle browser version in NPM package
0%
Description
Is there any possibility of distributing the browser version of Saxon-JS in the NPM module?
For context, the package.json may include a browser
attribute, that specifies a browser package that web bundlers may use when the library is imported. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#browser
Additionally, a module
attribute may specify an ESM module.
Including the browser bundle in the NPM package would ease dependency management, and facilitate library usage in applications with both node.js and browser-based components.
Updated by Norm Tovey-Walsh over 2 years ago
I'll definitely investigate creating an NPM package for the browser version.
Regarding modules, the distribution is compiled with the Closure compiler and my investigations didn't turn up any leads for how to get the Closure compiler to produce ESM modules (see bug #4655 on which you've already commented).
I'd be happy to hear about ways that we could make the distribution easier to use.
Updated by Daniel Naab over 2 years ago
Hi Norm, that's great to hear. You should be able to publish both the node.js and browser version in the same npm package.
Please register to edit this issue
Also available in: Atom PDF Tracking page