Skip to content
Permalink
Browse files
chore: migrate to rollup
This change allows us to:

- reduce the size of the bundle
- provide an ESM bundle (for usage in <script type="module">)

Related: #1198
  • Loading branch information
darrachequesne committed Oct 13, 2021
1 parent 16b6569 commit 0661564dc2005b95843ddb65621b7e89af702bc0
@@ -0,0 +1,3 @@
import { io } from "./index.js";

export default io;

Some generated files are not rendered by default. Learn more.

@@ -41,6 +41,10 @@
"@babel/core": "^7.15.0",
"@babel/plugin-transform-object-assign": "^7.14.5",
"@babel/preset-env": "^7.15.0",
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@sinonjs/fake-timers": "^7.1.2",
"@types/mocha": "^9.0.0",
"@types/node": "^16.7.6",
@@ -55,6 +59,8 @@
"mocha": "^3.3.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"rollup": "^2.58.0",
"rollup-plugin-terser": "^7.0.2",
"socket.io": "3.0.0",
"socket.io-browsers": "^1.0.0",
"socket.io-msgpack-parser": "^3.0.0",
@@ -76,7 +82,7 @@
"test:node": "mocha --require ts-node/register --reporter dot --require test/support/server.js test/index.js",
"test:browser": "zuul test/index.js",
"test:types": "tsd",
"build": "npm run compile && webpack --config ./support/webpack.config.js --config ./support/prod.config.js --config ./support/msgpack-parser.config.js",
"build": "rollup -c support/rollup.config.umd.js && rollup -c support/rollup.config.esm.js && rollup -c support/rollup.config.umd.msgpack.js",
"format:check": "prettier --check \"lib/**/*.ts\" \"test/**/*.js\" \"test/**/*.ts\" \"support/**/*.js\"",
"format:fix": "prettier --write \"lib/**/*.ts\" \"test/**/*.js\" \"test/**/*.ts\" \"support/**/*.js\"",
"prepack": "npm run compile"

0 comments on commit 0661564

Please sign in to comment.