Skip to content

Commit

Permalink
fix: Use rollup-plugin-auto-external
Browse files Browse the repository at this point in the history
  • Loading branch information
neet committed Sep 11, 2021
1 parent f61bfe5 commit ead7c36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@
"docs:build": "typedoc ./src && touch ./docs/.nojekyll"
},
"dependencies": {
"@types/ws": "^7.4.7",
"axios": "^0.21.1",
"change-case": "^4.1.2",
"eventemitter3": "^4.0.7",
"isomorphic-form-data": "^2.0.0",
"isomorphic-ws": "^4.0.1",
"normalize-url": "^7.0.1",
"semver": "^7.3.5",
"ws": "^8.2.1"
},
"peerDependencies": {
"isomorphic-form-data": "^2.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -39,6 +36,7 @@
"@types/jest": "^27.0.1",
"@types/node": "^16.7.10",
"@types/semver": "^7.3.8",
"@types/ws": "^7.4.7",
"@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.30.0",
"codecov": "^3.8.3",
Expand All @@ -48,7 +46,6 @@
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"isomorphic-form-data": "^2.0.0",
"jest": "^27.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
Expand Down
27 changes: 3 additions & 24 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import autoExternal from 'rollup-plugin-auto-external';
import typescript from 'rollup-plugin-typescript2';

import packageJSON from './package.json';

const external = [
'asynckit',
'axios',
'change-case',
'combined-stream',
'eventemitter3',
'fs',
'form-data',
'http',
'https',
'isomorphic-ws',
'mime-types',
'normalize-url',
'path',
'querystring',
'semver',
'url',
'util',
];

export default [
{
input: './src/index.ts',
Expand All @@ -32,8 +13,7 @@ export default [
format: 'cjs',
exports: 'named',
},
plugins: [commonjs(), json(), typescript()],
external,
plugins: [commonjs(), json(), typescript(), autoExternal()],
},
{
input: './src/index.ts',
Expand All @@ -42,7 +22,6 @@ export default [
format: 'esm',
exports: 'named',
},
plugins: [commonjs(), json(), typescript()],
external,
plugins: [commonjs(), json(), typescript(), autoExternal()],
},
];
2 changes: 2 additions & 0 deletions src/serializers/serializer-impl.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'isomorphic-form-data';

import { camelCase, snakeCase } from 'change-case';
import { ParsedUrlQuery, stringify } from 'querystring';

Expand Down

0 comments on commit ead7c36

Please sign in to comment.