Skip to content

Commit cff7201

Browse files
author
Igo Lapa
authored
fix(bundle): bundle dependencies correctly (#419)
We previously were bundling devDependencies instead of the dependencies and this was causing issues when bundling our SDK
1 parent b27fbfb commit cff7201

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
]
4848
},
4949
"dependencies": {
50-
"@types/node": "^17.0.1",
51-
"node-fetch": "^3.2.0"
50+
"@types/node": "^17.0.21",
51+
"node-fetch": "^3.2.3"
5252
},
5353
"devDependencies": {
5454
"@babel/core": "^7.15.5",

rollup.config.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import injectProcessEnv from 'rollup-plugin-inject-process-env'
1212
const packageJson = require('./package.json')
1313

1414
const globals = {
15-
...packageJson.devDependencies,
15+
...packageJson.dependencies,
1616
}
1717

1818
export default [
@@ -50,19 +50,7 @@ export default [
5050
}),
5151
terser(),
5252
],
53-
external: [
54-
...Object.keys(globals),
55-
'node:stream',
56-
'node:http',
57-
'node:zlib',
58-
'node:buffer',
59-
'node:https',
60-
'node:util',
61-
'node:url',
62-
'node:net',
63-
'node:path',
64-
'node:fs',
65-
],
53+
external: [...Object.keys(globals)],
6654
},
6755
{
6856
input: ['dist/index.d.ts', 'dist/types/index.d.ts'],

0 commit comments

Comments
 (0)