From d6d293b1ae80f18a1839c6fe3bd7dd4f784887b8 Mon Sep 17 00:00:00 2001 From: amandasavluchinske Date: Tue, 2 Jan 2024 16:32:14 -0300 Subject: [PATCH] Uses dynamic import for strip-ansi --- lib/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index f40230d..a5f3946 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,9 +20,8 @@ const get = require('lodash.get'); const each = require('lodash.foreach'); const fromPairs = require('lodash.frompairs'); const toPairs = require('lodash.topairs'); -const stripAnsi = require('strip-ansi'); -// const loadStripAnsi = async () => await import('strip-ansi'); -// const stripAnsi = loadStripAnsi(); +const loadStripAnsi = async () => await import('strip-ansi'); +const stripAnsi = loadStripAnsi(); function getAssetPath(compilation, name) { return path.join(compilation.getPath(compilation.compiler.outputPath), name.split('?')[0]);