Skip to content

Commit 7b97284

Browse files
Merge pull request #242 from Azure/main
Fix rollup (#241)
2 parents 30e879c + d41a80c commit 7b97284

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44
"description": "The JavaScript configuration provider for Azure App Configuration",
55
"files": [
66
"dist/",
7-
"types/",
87
"LICENSE",
98
"README.md"
109
],
1110
"exports": {
1211
"./package.json": "./package.json",
1312
".": {
1413
"import": {
15-
"types": "./types/index.d.ts",
14+
"types": "./dist/types/index.d.ts",
1615
"default": "./dist/esm/index.js"
1716
},
1817
"require": {
19-
"types": "./types/index.d.ts",
18+
"types": "./dist/types/index.d.ts",
2019
"default": "./dist/commonjs/index.js"
2120
}
2221
}
@@ -26,7 +25,7 @@
2625
"build-test": "npm run build-test-esm && npm run build-test-cjs",
2726
"build-test-esm": "tsc -p ./tsconfig.test.esm.json && cpy esm-package.json out/esm --rename=package.json",
2827
"build-test-cjs": "tsc -p ./tsconfig.test.cjs.json && cpy cjs-package.json out/commonjs --rename=package.json",
29-
"clean": "rimraf dist dist-esm out types",
28+
"clean": "rimraf dist out",
3029
"dev": "rollup --config --watch",
3130
"lint": "eslint src/ test/ examples/ --ext .js,.ts,.mjs",
3231
"fix-lint": "eslint src/ test/ examples/ --fix --ext .js,.ts,.mjs",

rollup.config.mjs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,13 @@ export default [
3131
],
3232
plugins: [
3333
typescript({
34-
compilerOptions: {
35-
"lib": [
36-
"DOM",
37-
"WebWorker",
38-
"ESNext"
39-
],
40-
"skipDefaultLibCheck": true,
41-
"module": "NodeNext",
42-
"moduleResolution": "NodeNext",
43-
"target": "ES2022",
44-
"strictNullChecks": true,
45-
"strictFunctionTypes": true,
46-
"sourceMap": true,
47-
"inlineSources": true
48-
}
34+
tsconfig: "./tsconfig.json",
4935
})
5036
],
5137
},
5238
{
5339
input: "src/index.ts",
54-
output: [{ file: "types/index.d.ts", format: "esm" }],
40+
output: [{ file: "dist/types/index.d.ts", format: "esm" }],
5541
plugins: [dts()],
5642
},
5743
];

tsconfig.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
{
22
"compilerOptions": {
3+
// Include ES2022 (modern JS), ESNext (future features), DOM and web worker APIs for browser support.
34
"lib": [
45
"DOM",
56
"WebWorker",
67
"ESNext",
78
"ES2022"
89
],
9-
"skipDefaultLibCheck": true,
10-
"moduleResolution": "Node",
10+
// Generate modern JavaScript syntax compatible with Node 18+ and modern browsers.
1111
"target": "ES2022",
12+
13+
// Use Node-style resolution to locate imports
14+
"moduleResolution": "Node",
15+
16+
// Allow default imports from CommonJS modules.
17+
"allowSyntheticDefaultImports": true,
18+
"esModuleInterop": true,
19+
20+
// Ensure strict type-checking
1221
"strictNullChecks": true,
1322
"strictFunctionTypes": true,
23+
"skipDefaultLibCheck": true,
24+
25+
// Generate source maps and inline original TypeScript sources for debugging.
1426
"sourceMap": true,
1527
"inlineSources": true,
16-
"allowSyntheticDefaultImports": true,
17-
"esModuleInterop": true
1828
},
1929
"exclude": [
2030
"node_modules",

0 commit comments

Comments
 (0)