From 3967f5ce2b12717f42c3b5845d14deab91942ab7 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Fri, 1 Sep 2023 18:43:03 +0200 Subject: [PATCH] let TypeScript output ES modules --- package.json5 | 2 +- tsconfig.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json5 b/package.json5 index 02bb592..4e03b9b 100644 --- a/package.json5 +++ b/package.json5 @@ -4,7 +4,7 @@ description: 'A hopeful final typescipt-pragmatic mathjs proof-of-concept', main: 'index.ts', scripts: { - 'build-and-run': 'ttsc -b && node build/index.js', + 'build-and-run': 'ttsc -b && echo {"type":"module"} > build/package.json && node build/index.js', }, keywords: [ 'math', diff --git a/tsconfig.json b/tsconfig.json index c6b3a50..eed8f17 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,6 @@ "allowJs": false, "noImplicitAny": false, "moduleResolution": "Node", - "module": "commonjs", "plugins": [{ "transform": "./src/plugins/typeInferPlugin.ts", "type": "raw"