Skip to content

Commit 333ee76

Browse files
committed
test with es6
1 parent c1bbd1f commit 333ee76

5 files changed

Lines changed: 14 additions & 7 deletions

File tree

bin/configs/typescript-fetch-with-npm-version.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ additionalProperties:
88
npmRepository: https://skimdb.npmjs.com/registry
99
snapshot: false
1010
ignoreDeprecations: true
11+
supportsES6: true

samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ src/models/Tag.ts
2424
src/models/User.ts
2525
src/models/index.ts
2626
src/runtime.ts
27+
tsconfig.esm.json
2728
tsconfig.json

samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
},
1010
"main": "./dist/index.js",
1111
"types": "./dist/index.d.ts",
12+
"module": "./dist/esm/index.js",
13+
"sideEffects": false,
1214
"scripts": {
13-
"build": "tsc",
15+
"build": "tsc && tsc -p tsconfig.esm.json",
1416
"prepare": "npm run build"
1517
},
1618
"devDependencies": {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "esnext",
5+
"outDir": "dist/esm"
6+
}
7+
}

samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{
22
"compilerOptions": {
33
"declaration": true,
4-
"target": "es5",
5-
"ignoreDeprecations": "5.0",
4+
"target": "es6",
5+
"ignoreDeprecations": "6.0",
66
"module": "commonjs",
77
"moduleResolution": "node",
88
"outDir": "dist",
9-
"lib": [
10-
"es6",
11-
"dom"
12-
],
139
"typeRoots": [
1410
"node_modules/@types"
1511
]

0 commit comments

Comments
 (0)