fix: backend won't start
This commit is contained in:
+8
-11
@@ -1,7 +1,7 @@
|
||||
import {defineConfig} from 'vite'
|
||||
import path from 'path'
|
||||
import {dirname} from "node:path";
|
||||
import {fileURLToPath} from "node:url";
|
||||
import {dirname} from "node:path"
|
||||
import {fileURLToPath} from "node:url"
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -12,21 +12,18 @@ export default defineConfig({
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
sourcemap: true,
|
||||
minify: 'esbuild', // Use esbuild for minification (default)
|
||||
minify: 'esbuild',
|
||||
assetsDir: 'assets',
|
||||
rollupOptions: {
|
||||
input: path.resolve(__dirname, 'src/index.html'),
|
||||
output: {
|
||||
assetFileNames: 'assets/[name]-[hash][extname]' // Hashing for cache busting
|
||||
}
|
||||
}
|
||||
assetFileNames: 'assets/[name]-[hash][extname]',
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'), // Optional alias for cleaner imports
|
||||
}
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"' // Inject environment variables
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user