-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
30 lines (29 loc) · 936 Bytes
/
vite.config.js
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
import {defineConfig} from "vite";
import react from '@vitejs/plugin-react'
import { resolve } from 'path';
export default defineConfig({
plugins: [
react()
],
base: 'build',
build: {
manifest: 'manifest.json',
copyPublicDir: false,
rollupOptions: {
input: {
'js/app.jsx': resolve(__dirname, 'resources/js/app.jsx'),
'styles/base.css': resolve(__dirname, 'resources/styles/base.css')
},
output: {
entryFileNames: (chunkInfo) => {
if (chunkInfo.name.includes('jsx')) {
const substring = '.jsx'
return chunkInfo.name.slice(0, chunkInfo.name.indexOf(substring)) + '.js'
}
return chunkInfo.name
}
}
},
outDir: resolve(__dirname, 'public/build')
}
})