[Suggestion] Allow specifying external module names for UMD (rollup output.globals)
See original GitHub issueCurrent Behavior
Expected behavior
It does guess the names correct in this case but a nicer output would be great. You may notice that guessed name for the last react-dom
is not even visible. It could lead to unexpected results if it would guess in the wrong way.
Suggested solution(s)
I wonder why it’s not possible to specify externals in a similar fashion as microbundle does. Since it would be optional, it doesn’t make the whole experience of zero configuration any worse.
Additional context
Used in building the https://github.com/JustFly1984/react-google-maps-api
Your environment
Software | Version(s) |
---|---|
TSDX | 0.6.1 |
TypeScript | 3.5.1 |
Browser | N/A |
Yarn | 1.16.0 |
Operating System | Windows x64 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
rollup.js
js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the...
Read more >Bundling with rollup a library that imports a legacy UMD ...
You can use the suggested output.globals option in your Rollup configuration to specify the correct global variable names for these modules.
Read more >Code-splitting for libraries—bundling for npm with Rollup 1.0
To have external dependencies in a UMD or IIFE build, you also need to specify under which global variable names the external dependencies...
Read more >An Introduction to the Rollup.js JavaScript Bundler
Rollup.js is a next-generation JavaScript module bundler from Rich Harris, the author of Svelte. It compiles multiple source files into a ...
Read more >How to Create a Hybrid NPM Module for ESM and ...
When reading Node documentation, you read about Webpack and Rollup, ESM, CommonJS, UMD and AMD. You read that .mjs and .cjs extensions are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, as I said, why not to get inspired by microbundle? I like the way they tackled it in there with CLI option.
https://github.com/developit/microbundle#all-cli-options
So
tsdx.config.js
was added in #183 and released in v0.9.I think configuring Rollup’s
output.globals
andexternals
is much easier via that than via CLI, so I’m going to close this out