From 4d72a71abeb5c4deb116c360e4d2d52fb00b237e Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Sat, 7 Oct 2023 21:18:42 +0200 Subject: [PATCH] Enable verbatimModuleSyntax TypeScript config --- packages/react-datetimerange-picker/package.json | 4 ++-- packages/react-datetimerange-picker/tsconfig.json | 4 +++- sample/tsconfig.json | 3 ++- test/tsconfig.json | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/react-datetimerange-picker/package.json b/packages/react-datetimerange-picker/package.json index 6b57c19..dabd1ff 100644 --- a/packages/react-datetimerange-picker/package.json +++ b/packages/react-datetimerange-picker/package.json @@ -20,8 +20,8 @@ "scripts": { "build": "yarn build-js && yarn copy-styles", "build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package && yarn build-js-cjs-replace", - "build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", - "build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", + "build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm", + "build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --verbatimModuleSyntax false", "build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json", "build-js-cjs-replace": "replace-in-files --string='/dist/esm/' --replacement='/dist/cjs/' dist/cjs/**/*", "clean": "rimraf dist", diff --git a/packages/react-datetimerange-picker/tsconfig.json b/packages/react-datetimerange-picker/tsconfig.json index ebc0e5b..b18b5c6 100644 --- a/packages/react-datetimerange-picker/tsconfig.json +++ b/packages/react-datetimerange-picker/tsconfig.json @@ -4,11 +4,13 @@ "esModuleInterop": true, "isolatedModules": true, "jsx": "react", + "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, "outDir": "dist", "strict": true, - "target": "es5" + "target": "es5", + "verbatimModuleSyntax": true }, "include": ["src"] } diff --git a/sample/tsconfig.json b/sample/tsconfig.json index 5fc6458..96ce1f8 100644 --- a/sample/tsconfig.json +++ b/sample/tsconfig.json @@ -9,6 +9,7 @@ "noUncheckedIndexedAccess": true, "outDir": "dist", "strict": true, - "target": "es5" + "target": "esnext", + "verbatimModuleSyntax": true } } diff --git a/test/tsconfig.json b/test/tsconfig.json index 5fc6458..96ce1f8 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -9,6 +9,7 @@ "noUncheckedIndexedAccess": true, "outDir": "dist", "strict": true, - "target": "es5" + "target": "esnext", + "verbatimModuleSyntax": true } }