generate bundled, one file, esm build, too #817
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not sure if this is the right way, but my problem is the following: I'm using https://github.com/rails/importmap-rails to vendor js files by downloading them. It only downloads the file https://ga.jspm.io/npm:[email protected]/esm/index.js which references other modules though, which are not downloaded and then 404. importmap-rails expects one file to contain everything, see for example rails/importmap-rails#65 and rails/importmap-rails#153.
I just amended the rollup config to create such a bundled esm file. It seems to work by my manual tests, so maybe you could see if everything is correct and generate this file when publishing the package?
In addition it would be nice to know if https://github.com/rails/importmap-rails can be made to automatically use it then (I assume it uses the
module:
entrypoint by default; is there maybe an entrypoint definition for "one module containing them all"?), but first I'd like to make sure the bundled esm is generated correctly and there's a chance for it to be included when imask is built.WDYT?