File size: 1,205 Bytes
b1cc7ae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import { viteStaticCopy } from 'vite-plugin-static-copy'
const absPath = (fp: string): string => {
return resolve(__dirname, fp)
}
// https://vitejs.dev/config/
export default defineConfig({
define: {
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'true'
},
base: "./",
build: {
outDir: 'www',
},
plugins: [vue({
script: {
defineModel: true
}
}),
// viteStaticCopy({
// targets: [
// {
// src: 'node_modules/@ricky0123/vad-web/dist/vad.worklet.bundle.min.js',
// dest: './assets/'
// },
// {
// src: 'node_modules/@ricky0123/vad-web/dist/silero_vad.onnx',
// dest: './assets/'
// },
// {
// src: 'node_modules/onnxruntime-web/dist/*.wasm',
// dest: './assets/'
// },
// {
// src: 'node_modules/onnxruntime-web/dist/*.mjs',
// dest: './assets/'
// }
// ]
// })
],
assetsInclude: [
"**/*.txt",
],
resolve: {
alias: {
// @ is an alias to /src
'@': absPath('src'),
}
}
})
|