Skip to content

Commit

Permalink
upgrade some package
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeydi committed Jan 8, 2025
1 parent bf31c95 commit 727ffe7
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 384 deletions.
5 changes: 3 additions & 2 deletions developers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
"preview": "vite preview"
},
"dependencies": {
"@mixin.dev/mixin-node-sdk": "7.0.8",
"@mixin.dev/mixin-node-sdk": "7.2.0",
"assert": "^2.0.0",
"bignumber.js": "^9.1.2",
"clipboard": "^2.0.11",
"element-plus": "^2.7.3",
"file-saver": "^2.0.5",
"node-forge": "^1.3.1",
"pinia": "^2.1.7",
"qs": "^6.11.2",
"sass": "^1.77.2",
Expand All @@ -38,7 +39,7 @@
"unplugin-auto-import": "^0.17.6",
"unplugin-element-plus": "^0.7.1",
"unplugin-vue-components": "^0.27.0",
"vite": "^5.2.11",
"vite": "^6.0.7",
"vite-plugin-mkcert": "^1.17.2",
"vite-plugin-node-polyfills": "^0.22.0",
"vue-eslint-parser": "^9.4.0"
Expand Down
101 changes: 0 additions & 101 deletions developers/vite.config.js

This file was deleted.

62 changes: 62 additions & 0 deletions developers/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';
import rollupNodePolyFill from 'rollup-plugin-node-polyfills';
import mkcert from 'vite-plugin-mkcert';
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const config = {
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
nodePolyfills(),
mkcert()
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: 'globalThis'
},
// Enable esbuild polyfill plugins
plugins: [
NodeGlobalsPolyfillPlugin({
buffer: true,
process: true
}),
NodeModulesPolyfillPlugin()
]
}
},
build: {
rollupOptions: {
plugins: [
rollupNodePolyFill()
]
}
}
}

if (mode === 'production') {
// Add production specific config here if needed
}

return config
})
Loading

0 comments on commit 727ffe7

Please sign in to comment.