From acca8f2835453c42beda564e3dc8b315c4f0fd85 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Sat, 7 Oct 2023 21:17:59 +0200 Subject: [PATCH] Enable verbatimModuleSyntax TypeScript config --- packages/react-date-picker/package.json | 4 ++-- packages/react-date-picker/tsconfig.json | 4 +++- sample/tsconfig.json | 3 ++- test/tsconfig.json | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/react-date-picker/package.json b/packages/react-date-picker/package.json index d6797f98..5320bde1 100644 --- a/packages/react-date-picker/package.json +++ b/packages/react-date-picker/package.json @@ -80,8 +80,8 @@ "scripts": { "build": "yarn build-js && yarn copy-styles", "build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package", - "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", "clean": "rimraf dist", "copy-styles": "cpy 'src/**/*.css' dist", diff --git a/packages/react-date-picker/tsconfig.json b/packages/react-date-picker/tsconfig.json index ebc0e5b4..b18b5c6d 100644 --- a/packages/react-date-picker/tsconfig.json +++ b/packages/react-date-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 5fc6458c..96ce1f8c 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 5fc6458c..96ce1f8c 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 } }