Project

Profile

Help

Feature #5011

open

Bundle browser version in NPM package

Added by Daniel Naab almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-05-28
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

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.

Actions #1

Updated by Norm Tovey-Walsh almost 3 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.

Actions #2

Updated by Daniel Naab almost 3 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