Skip to content

Commit 17b9086

Browse files
committed
Fix deployment bundle size and chunking configuration
1 parent 83edf65 commit 17b9086

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

bun.lockb

54.9 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@vitejs/plugin-vue": "^latest",
2323
"crypto-browserify": "^3.12.0",
2424
"os-browserify": "^0.3.0",
25+
"permaweb-deploy": "2.5.1",
2526
"process": "^0.11.10",
2627
"rollup-plugin-node-polyfills": "^0.2.1",
2728
"stream-browserify": "^3.0.0",

vite.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export default defineConfig(({ command, mode }) => {
3838
__VUE_OPTIONS_API__: false,
3939
__VUE_PROD_DEVTOOLS__: false,
4040
},
41-
// Externalize the large SDK bundle
42-
external: ['@ar.io/sdk/bundles/web.bundle.min.js'],
41+
4342
resolve: {
4443
alias: {
4544
stream: "stream-browserify",
@@ -92,13 +91,15 @@ export default defineConfig(({ command, mode }) => {
9291
},
9392
manualChunks: {
9493
'aoconnect': ['@permaweb/aoconnect'],
94+
'ar-io-sdk': ['@ar.io/sdk', '@ar.io/wayfinder-core'],
9595
'vue-vendor': ['vue'],
96-
'lodash': ['lodash']
96+
'lodash': ['lodash'],
97+
'polyfills': ['crypto-browserify', 'stream-browserify', 'process', 'util', 'os-browserify']
9798
},
9899
},
99100
},
100101

101-
chunkSizeWarningLimit: 1000,
102+
chunkSizeWarningLimit: 2000,
102103
cssCodeSplit: false,
103104
},
104105
esbuild: {

0 commit comments

Comments
 (0)