Skip to content

Commit d969c5d

Browse files
committed
Enable verbatimModuleSyntax TypeScript config
1 parent 1ab2cd3 commit d969c5d

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

packages/react-datetime-picker/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"scripts": {
3333
"build": "yarn build-js && yarn copy-styles",
3434
"build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package && yarn build-js-cjs-replace",
35-
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext",
36-
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs",
35+
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm",
36+
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --verbatimModuleSyntax false",
3737
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
3838
"build-js-cjs-replace": "replace-in-files --string='/dist/esm/' --replacement='/dist/cjs/' dist/cjs/**/*",
3939
"clean": "rimraf dist",

packages/react-datetime-picker/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
"esModuleInterop": true,
55
"isolatedModules": true,
66
"jsx": "react",
7+
"module": "esnext",
78
"moduleResolution": "node",
89
"noUncheckedIndexedAccess": true,
910
"outDir": "dist",
1011
"strict": true,
11-
"target": "es5"
12+
"target": "es5",
13+
"verbatimModuleSyntax": true
1214
},
1315
"include": ["src"]
1416
}

sample/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"noUncheckedIndexedAccess": true,
1010
"outDir": "dist",
1111
"strict": true,
12-
"target": "es5"
12+
"target": "esnext",
13+
"verbatimModuleSyntax": true
1314
}
1415
}

test/Test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ViewOptions from './ViewOptions.js';
1212

1313
import './Test.css';
1414

15-
import { Detail, LooseValue } from './shared/types.js';
15+
import type { Detail, LooseValue } from './shared/types.js';
1616

1717
const now = new Date();
1818

test/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"noUncheckedIndexedAccess": true,
1010
"outDir": "dist",
1111
"strict": true,
12-
"target": "es5"
12+
"target": "esnext",
13+
"verbatimModuleSyntax": true
1314
}
1415
}

0 commit comments

Comments
 (0)