Browserified search addon includes a copy of Terminal
See original GitHub issueRegressed in https://github.com/sourcelair/xterm.js/pull/834
When browserify sees this:
module.exports = addon(require('../../xterm'));
It merges all of xterm into this file. One way to work around this is to pull the string out so browserify doesn’t pick it up:
const xterm = '../../xterm';
module.exports = addon(require(xterm));
This produces a warning in webpack:
WARNING in ../~/xterm/lib/addons/search/search.js
10:31-45 Critical dependency: the request of a dependency is an expression
This warning is preferable really, I wonder if there is a better way to build something (search addon) that depends on a lib (xterm.js) without packaging the lib with it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Browserify
Browserify lets you require('modules') in the browser by bundling up all of your dependencies. Install Documentation · Source Code · Help + Articles...
Read more >How to Polyfill node core modules in webpack 5
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if...
Read more >npm start not working in vs code terminal
Update: Since version 1.3 Visual Studio Code has integrated terminal. To open it, use any of these methods: Use the Ctrl + `...
Read more >Setting Up CanJS | getting started | Guides
StealJS; webpack; Browserify; DoneJS; Script tags setups; Hosted traditional ... Copy. This file is large as it includes nearly every extension to CanJS....
Read more >Webpack or Browserify & Gulp: Which Is Better?
Bundle our JS & CSS files (including ES6 to ES5 transpilation, SASS to CSS conversion and sourcemaps) in a scalable manner on watched...
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
Possible fix is for instead of search.ts to find Terminal.ts, have
Terminal.loadAddon
load the addon and then passTerminal
into it.In search.ts:
In Terminal.ts:
I’m consolidating all bundling/loadAddon related issues into https://github.com/sourcelair/xterm.js/issues/1018, please comment on that issue if you have thoughts 😃