Skip to content

Commit

Permalink
fix(ci): fix base path
Browse files Browse the repository at this point in the history
  • Loading branch information
tiamo committed Nov 27, 2024
1 parent a655aa8 commit bff9a45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions packages/demo/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_BASE_URL=/solana-wallet-adapter-vue/
33 changes: 19 additions & 14 deletions packages/demo/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import { resolve } from 'node:path'
import process from 'node:process'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
// https://github.com/davidmyersdev/vite-plugin-node-polyfills
nodePolyfills(),
],
resolve: {
alias: {
'~/': `${resolve(__dirname, 'src')}/`,
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
return {
base: env.VITE_BASE_URL || '/',
plugins: [
vue(),
// https://github.com/davidmyersdev/vite-plugin-node-polyfills
nodePolyfills(),
],
resolve: {
alias: {
'~/': `${resolve(__dirname, 'src')}/`,
},
},
},
define: {
'process.env': {},
},
define: {
'process.env': {},
},
}
})

0 comments on commit bff9a45

Please sign in to comment.