We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b3fdb8 commit 6d03c22Copy full SHA for 6d03c22
vite.config.js
@@ -1,4 +1,6 @@
1
import { defineConfig } from 'vite'
2
+import { copyFileSync, mkdirSync } from 'fs'
3
+import { join } from 'path'
4
5
export default defineConfig({
6
root: './src',
@@ -14,6 +16,19 @@ export default defineConfig({
14
16
output: {
15
17
manualChunks: undefined
18
}
19
+ },
20
+ copyPublicDir: false // We'll handle copying manually
21
22
+ publicDir: './assets',
23
+ plugins: [
24
+ {
25
+ name: 'copy-assets',
26
+ writeBundle() {
27
+ // Create assets directory in dist
28
+ mkdirSync('dist/assets', { recursive: true })
29
+ // Copy miao.txt to assets folder
30
+ copyFileSync('src/assets/miao.txt', 'dist/assets/miao.txt')
31
+ }
32
- }
33
+ ]
34
})
0 commit comments