question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve .npmignore of xterm-addon-search

See original GitHub issue

You can see from https://unpkg.com/browse/xterm-addon-search@0.7.0/

that the xterm-addon-search npm packages contains unnecessary resources:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jerchcommented, Apr 27, 2021

To solve the build target ambiguity, there is a new package.json entry exports since nodejs v12 (see here for an introduction). With this we can distribute ES6 builds together with default nodejs build (commonjs) in just one package. It is even possible to put an IIFE build as third goodie in the package so old style non ES6 script tags still work.

1reaction
mofuxcommented, Mar 22, 2021

If we want browser builds to be distributed via npm, we should do a second package with main pointing to an ES6 module bundle of the addon. Those will not work in nodejs out-of-the-box, but the browser will be more than happy.

AFAIK we could use themodule field in package.json to point to the entry file of the ES6 Module bundle. The main should still point to the CJS version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

xterm-addon-search/.npmignore at master · xtermjs/xterm-addon ...
Addons by the core team are now developed in the main repo - xterm-addon-search/.npmignore at master ... xtermjs / xterm-addon-search Public archive.
Read more >
xterm-addon-search - npm
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables searching the buffer. This addon requires xterm.js v4+.
Read more >
Files · master · Mark McCahill / xterm.js - Duke Gitlab
Addons are JavaScript modules that attach functions to the Terminal prototype to extend its functionality. There are a handful available in the main...
Read more >
Newest 'xtermjs' Questions - Stack Overflow
xterm -addon-search return false. I have a write code like about search into the xtermjs terminal. But it return always false const term...
Read more >
Xterm.js - Best of JS
x-terminal: Atom plugin for providing terminals inside your Atom workspace. CoCalc: Lots of free software pre-installed, to chat, collaborate, develop, program, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found