From 7c37ad00fb2c3d9b949926ea772d8601c8326f9c Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Fri, 8 Dec 2023 10:53:36 -0700 Subject: [PATCH] fix: use node versus ts-node to run scripts --- utils/sf-config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/sf-config.js b/utils/sf-config.js index 53ba2cb9..d027bac2 100644 --- a/utils/sf-config.js +++ b/utils/sf-config.js @@ -93,7 +93,8 @@ const resolveConfig = (path) => { // if path is undefined/null, assume we're executing from a plugin root const usesJsBinScripts = existsSync(join(path ?? process.cwd(), 'bin', 'dev.js')); - const dev = usesJsBinScripts ? 'ts-node "./bin/dev.js"' : '"./bin/dev"'; + const loader = 'node --loader ts-node/esm --no-warnings=ExperimentalWarning'; + const dev = usesJsBinScripts ? `${loader} "./bin/dev.js"` : '"./bin/dev"'; const pluginDefaults = { scripts: { ...PACKAGE_DEFAULTS.scripts,