-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
vite.config.js
41 lines (39 loc) · 1.19 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
import { defineConfig, loadEnv } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const theme = env.APP_THEME || 'default';
const outDir = 'public/build/' + theme;
const buildDirectory = 'build/' + theme;
return {
plugins: [
laravel({
input: `/resources/${theme}/js/app.js`,
buildDirectory: buildDirectory,
ssr: `/resources/${theme}/js/ssr.js`,
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
compilerOptions: {
isCustomElement: (tag) => ['marquee'].includes(tag),
}
},
}),
],
build: {
chunkSizeWarningLimit: 2000,
outDir: outDir,
},
resolve: {
alias: {
'@': '/resources/' + theme + '/js',
},
},
};
});