Import shared core from ../../../out/common|browser in addons so tsc and runtime agree. Enable preserveConstEnums so const enums remain in compiled out/ for addon consumers. Build xterm esbuild before addons so out-esbuild exists for parallel addon jobs. Verified: npm run setup, esbuild-demo-client, package. Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
@xterm/addon-fit
An addon for xterm.js that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.
Install
npm install --save @xterm/addon-fit
Usage
import { Terminal } from '@xterm/xterm';
import { FitAddon } from '@xterm/addon-fit';
const terminal = new Terminal();
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
terminal.open(containerElement);
fitAddon.fit();
See the full API for more advanced usage.