From 1bcc9f67c1d272c033dc9341faec3712de654aaf Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Tue, 5 Mar 2024 17:18:09 +0100 Subject: [PATCH] fix: faster startup time of the CLI and REPL by loading the bundled file --- HISTORY.md | 1 + bin/cli.js | 2 +- bin/repl.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index bbb96211f4..bd9740520d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ - Fix #3163: `toTex` wrongly returning `Infinity` for large BigNumbers. - Fix #3162: add license information about CSParse (#3164). +- Fix: faster startup time of the CLI and REPL by loading the bundle. # 2024-02-22, 12.4.0 diff --git a/bin/cli.js b/bin/cli.js index c1b7a48e16..664f6a640e 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -59,7 +59,7 @@ const PRECISION = 14 // decimals * @return {*} */ function getMath () { - return require('../lib/cjs/defaultInstance.js').default + return require('../lib/browser/math.js') } /** diff --git a/bin/repl.js b/bin/repl.js index 21c9b1164a..9ad06fef0a 100755 --- a/bin/repl.js +++ b/bin/repl.js @@ -4,7 +4,7 @@ * This simply preloads mathjs and drops you into a REPL to * help interactive debugging. **/ -global.math = require('../lib/cjs/defaultInstance.js').default +global.math = require('../lib/browser/math.js') const repl = require('repl') repl.start({ useGlobal: true })