Skip to content

Commit

Permalink
fix: correct browserlists for module and smaller builds
Browse files Browse the repository at this point in the history
before: Created bundle vega-datasets.module.js: 38.18 kB → 9.7 kB (gzip)
after: Created bundle vega-datasets.module.js: 13.06 kB → 2.94 kB (gzip)
  • Loading branch information
domoritz committed Apr 20, 2023
1 parent add1a38 commit e1f1f0b
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 231 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
"data"
],
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.20.13",
"@babel/core": "^7.21.4",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@babel/runtime": "^7.21.0",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-node-resolve": "^15.0.2",
"@types/d3-dsv": "^3.0.1",
"d3-dsv": "^3.0.1",
"datalib": "^1.9.3",
"release-it": "^15.6.0",
"rollup": "^3.15.0",
"release-it": "^15.10.1",
"rollup": "^3.20.6",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.2.0",
"terser": "^5.16.3",
"typescript": "^5.0.3"
"terser": "^5.17.1",
"typescript": "^5.0.4"
},
"scripts": {
"prebuild": "./scripts/make-url-index.sh > src/urls.ts",
Expand Down
5 changes: 2 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const plugins = (browserslist, declaration) => [
declarationMap: declaration,
}),
transpiler: "babel",
babelConfig: { presets: ["@babel/preset-env"] },
browserslist,
}),
bundleSize(),
Expand All @@ -30,7 +29,7 @@ const outputs = [
format: "esm",
sourcemap: true,
},
plugins: plugins(undefined, true)
plugins: plugins(false, true)
},
{
input: "src/index.ts",
Expand All @@ -49,7 +48,7 @@ const outputs = [
plugins: [terser()],
},
],
plugins: plugins("defaults and not IE 11", false)
plugins: plugins("defaults", false)
},
];

Expand Down
Loading

0 comments on commit e1f1f0b

Please sign in to comment.