Skip to content

Commit 87e05ba

Browse files
authored
Fixes for older versions of node (#101)
* Changes "main" to commonjs export for old node versions, specifies jsdelivr export path to ESM export, sets commonjs target to lower ESM version to support node 8 * Compile ESM version to ES2017 as well * 2.8.4
1 parent 387bee3 commit 87e05ba

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "baseline-browser-mapping",
3-
"main": "./dist/index.js",
4-
"version": "2.8.3",
3+
"main": "./dist/index.cjs",
4+
"version": "2.8.4",
55
"description": "A library for obtaining browser versions with their maximum supported Baseline feature set and Widely Available status.",
66
"exports": {
77
".": {
@@ -14,6 +14,7 @@
1414
"types": "./dist/index.d.ts"
1515
}
1616
},
17+
"jsdelivr": "./dist/index.js",
1718
"files": [
1819
"dist/*",
1920
"!dist/scripts/*",

rollup.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ export default [
99
dir: "dist",
1010
},
1111
plugins: [
12-
typescript({ tsconfig: "./tsconfig.json", outDir: "dist" }),
12+
typescript({
13+
tsconfig: "./tsconfig.json",
14+
outDir: "dist",
15+
target: "es2017",
16+
}),
1317
terser(),
1418
],
1519
},
@@ -20,7 +24,11 @@ export default [
2024
file: "dist/index.cjs",
2125
},
2226
plugins: [
23-
typescript({ tsconfig: "./tsconfig.json", outDir: "dist" }),
27+
typescript({
28+
tsconfig: "./tsconfig.json",
29+
outDir: "dist",
30+
target: "es2017",
31+
}),
2432
terser(),
2533
],
2634
},

0 commit comments

Comments
 (0)