-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
react-xterm contains dynamic requires which causes Webpack to be overly aggressive when bundling and include all the addons and corresponding tests:
this.props.addons.forEach(s => {
const addon = require(`xterm/dist/addons/${s}/${s}`);
Terminal.applyAddon(addon);
});Causing the following error:
* chai in ./node_modules/xterm/dist/addons/attach/attach.test.js, ./node_modules/xterm/dist/addons/fit/fit.test.js and 4 others
* express in ./node_modules/xterm/dist/addons/zmodem/demo/app.js
* express-ws in ./node_modules/xterm/dist/addons/zmodem/demo/app.js
Caused by this dynamic require which causes webpack to bundle all the addons and their tests:
Perhaps the signature of this.props.addons can be an array of the addon modules directly, rather than an array of strings which are converted into dynamic imports?
Metadata
Metadata
Assignees
Labels
No labels