Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmeel committed Sep 14, 2024
1 parent dfe0456 commit 85ce25b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 9 deletions.
7 changes: 2 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-transform-runtime"
]
}
"plugins": ["@babel/plugin-transform-runtime"]
}
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@mui/material": "^5.16.7",
"@mui/styled-engine-sc": "^6.0.0-alpha.18",
"@mui/x-data-grid": "^7.12.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^26.0.1",
"@swc/core": "^1.7.22",
"@tbdex/http-client": "^1.1.0",
Expand Down
31 changes: 27 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,32 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import commonjs from "@rollup/plugin-commonjs";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { visualizer } from "rollup-plugin-visualizer";
import { babel } from '@rollup/plugin-babel';

export default defineConfig({
plugins: [
react(),
babel({
babelHelpers: 'bundled',
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-transform-runtime'],
exclude: 'node_modules/**',
}),
commonjs({
requireReturnsDefault: 'auto',
include: [
/node_modules/,
/\/node_modules\/@tbdex\/http-client/,
/\/node_modules\/@web5\/dids/,
/\/node_modules\/multiformats/,
],
transformMixedEsModules: true,
}),
nodePolyfills({
protocolImports: true,
}),
visualizer(),
],
resolve: {
alias: {
Expand All @@ -27,19 +38,31 @@ export default defineConfig({
http: "stream-http",
https: "https-browserify",
buffer: "buffer",
process: "process/browser",
},
},
build: {
commonjsOptions: {
transformMixedEsModules: true,
include: [/node_modules/],
},
rollupOptions: {
plugins: [commonjs()],
output: {
manualChunks: {
vendor: ['react', 'react-dom', 'ethers'],
tbdex: ['@tbdex/http-client'],
web5: ['@web5/dids'],
},
},
},
sourcemap: true,
},
define: {
"process.env": {},
global: "globalThis",
'process.env': {},
global: 'globalThis',
},
optimizeDeps: {
include: ['react', 'react-dom', 'ethers', '@tbdex/http-client', '@web5/dids'],
include: ['react', 'react-dom', 'ethers', '@tbdex/http-client', '@web5/dids', 'multiformats'],
esbuildOptions: {
target: 'esnext',
supported: { bigint: true },
Expand Down

0 comments on commit 85ce25b

Please sign in to comment.