-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
executable file
·50 lines (46 loc) · 1.18 KB
/
vite.config.js
File metadata and controls
executable file
·50 lines (46 loc) · 1.18 KB
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
// modification must be sync with packages/skeleton/vite.config.js
import { defineConfig } from 'vite'
import symfonyPlugin from 'vite-plugin-symfony'
import { resolve } from 'path'
import tailwindcss from '@tailwindcss/vite'
import viteCopyPlugin from 'vite-plugin-static-copy'
const filesToCopy = [
{
from: 'src/Resources/assets/favicons/*',
to: '',
},
]
const input = {
app: resolve(__dirname, '../js-helper/src/app.js'),
alpine: resolve(__dirname, '../js-helper/src/alpine.js'),
style: resolve(__dirname, '../js-helper/src/app.css'),
}
export default defineConfig({
plugins: [
symfonyPlugin(),
tailwindcss(),
viteCopyPlugin.viteStaticCopy({
targets: filesToCopy.map((copy) => ({
src: copy.from,
dest: copy.to || '',
})),
}),
],
resolve: {
modules: [resolve(__dirname, '../js-helper/node_modules'), 'node_modules'],
},
build: {
rollupOptions: {
input: input,
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]',
},
},
outDir: 'src/Resources/public',
emptyOutDir: true,
manifest: true,
sourcemap: false,
},
})