Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit d3d71ac

Browse files
fix: update vite example (#431)
Fixes: #449 Co-authored-by: achingbrain <[email protected]>
1 parent efc503b commit d3d71ac

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
},
1919
"browserslist": "last 1 Chrome version",
2020
"dependencies": {
21-
"ipfs-http-client": "^57.0.1",
21+
"ipfs-http-client": "^58.0.0",
2222
"react": "^17.0.2",
2323
"react-dom": "^17.0.2"
2424
},
2525
"devDependencies": {
2626
"@babel/core": "^7.14.8",
2727
"@playwright/test": "^1.12.3",
28-
"ipfs": "^0.63.3",
28+
"ipfs": "^0.64.0",
2929
"playwright": "^1.12.3",
3030
"process": "^0.11.10",
3131
"rimraf": "^3.0.2",
3232
"test-util-ipfs-example": "^1.0.2",
3333
"util": "^0.12.4",
34-
"vite": "^3.0.0-beta.1"
34+
"vite": "^3.1.0"
3535
}
3636
}

vite.config.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1-
export default {
1+
import { defineConfig } from 'vite'
2+
3+
export default defineConfig({
24
build: {
3-
target: 'esnext',
4-
minify: false
5+
target: 'es2020',
6+
minify: false,
7+
// disable @rollup/plugin-commonjs https://github.com/vitejs/vite/issues/9703#issuecomment-1216662109
8+
// should be removable with vite 4 https://vitejs.dev/blog/announcing-vite3.html#esbuild-deps-optimization-at-build-time-experimental
9+
commonjsOptions: {
10+
include: []
11+
}
512
},
613
define: {
714
'process.env.NODE_DEBUG': 'false',
815
'global': 'globalThis'
16+
},
17+
optimizeDeps: {
18+
// enable esbuild dep optimization during build https://github.com/vitejs/vite/issues/9703#issuecomment-1216662109
19+
// should be removable with vite 4 https://vitejs.dev/blog/announcing-vite3.html#esbuild-deps-optimization-at-build-time-experimental
20+
disabled: false,
21+
22+
// target: es2020 added as workaround to make big ints work
23+
// - should be removable with vite 4
24+
// https://github.com/vitejs/vite/issues/9062#issuecomment-1182818044
25+
esbuildOptions: {
26+
target: 'es2020'
27+
}
928
}
10-
}
29+
})

0 commit comments

Comments
 (0)