Generate esm output for xterm.js
See original GitHub issueHello!
Currently, we are using Rollup to handle our bundling. We recently upgraded from 3.14.5
to 4.10.0
, and got the error of:
I’ll admit I didn’t verify if it is correctly giving the name export since node_modules/xterm/lib/xterm.js
is minified, or this honestly may be an issue with Rollup. But if I’m not mistaken, generating an esm
build would also allow for better tree shaking, which according to bundlephobia currently is not supported.
Thanks! I’m open to opening this PR myself if needed, as I think it’s a small change in the webpack config 😄
Looking forward to the response!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to build and use xterm.js locally? - Stack Overflow
To start using xterm.js on your browser, add the xterm.js and xterm.css to the head of your html page. Then create a onto...
Read more >Encoding - Xterm.js
Output. Terminal.onData. contains real string data with any valid Unicode codepoint, thus the payload should be treated as UTF-16/UCS-2.
Read more >xterm-for-react - npm Package Health Analysis - Snyk
The main component to this library is 'XTerm'. This will create a div and use it to open a XTerm.js terminal. The base...
Read more >[pve-devel] [PATCH xtermjs 1/3] upgrade xterm.js to version ...
adapt version of xterm.js also download and unpack xterm-addon-fit ... __esModule) return value;\n \t\tvar ns = Object.create(null);\n ...
Read more >sourcelair/xterm.js - Gitter
vue.esm.js?efeb:1897 TypeError: term.on is not a function ... Hey Guys, I just create a xterm playback tool with audio support based on xterm.js....
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
Let’s close for now since we’re blocked on it, but feel free to open a new issue or comment on this one when https://github.com/webpack/webpack/issues/2933 gets resolved. I think even if TS supported it as a target that wouldn’t be enough since we use custom path mappings.
@Tyriar
Ah yes, I don’t think npm highlights it, since they focus on the “node” use case? But it is a common pattern. For instance, looking at comlink, their npm package has the module field and bundlers will respect it
@mofux
Ah, thank you very very much for looking into this! 😄
Ah that’s quite unfortunate, didn’t know that Typescript and Webpack had troubles with this. Definitely not a smalled fix like I had originally though. Thanks for all the context and looking into this 👍
Totally, sounds like a good plan to me 😄
@Tyriar @mofux
You think it’d be a good idea to close this for now? Or keep it open for the future? I’m open to either 😄