-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.js
executable file
·86 lines (75 loc) · 2.03 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//const dotenvExpand = require('dotenv-expand');
//dotenvExpand(
// require('dotenv').config({ path: '../../.env' /*, debug: true*/ }),
//);
import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin'
export default defineConfig({
build: {
//outDir: '../../../public_html/build/ewall',
outDir: './Resources/dist',
emptyOutDir: false,
manifest: 'manifest.json',
//rollupOptions: {
// output: {
// entryFileNames: `assets/[name].js`,
// chunkFileNames: `assets/[name].js`,
// assetFileNames: `assets/[name].[ext]`
// }
//}
},
ssr: {
noExternal: ['chart.js/**']
},
plugins: [
laravel({
publicDirectory: '../../../public_html/',
// buildDirectory: 'assets/',
input: [
//__dirname + '/Resources/sass/app.scss',
//__dirname + '/Resources/scss/app-mix.scss',
__dirname + '/Resources/css/app.css',
__dirname + '/Resources/js/app.js',
//__dirname + '/Resources/css/filament/theme.css'
],
refresh: [
...refreshPaths,
'app/Livewire/**',
],
}),
],
});
/*
import collectModuleAssetsPaths from './../../vite-module-loader.js';
async function getConfig() {
const paths = [
'resources/css/app.css',
'resources/js/app.js',
];
const allPaths = await collectModuleAssetsPaths(paths, 'Modules');
return defineConfig({
plugins: [
laravel({
input: allPaths,
refresh: true,
})
]
});
}
export default getConfig();
*/
/*
var $from = './Resources/dist';
var $to = '../../../public_html/themes/Five/dist';
console.log('from :' + $from);
console.log('to :' + $to);
//mix.copyDirectory($from, $to);
viteStaticCopy({
targets: [
{
src: $from,
dest: $to
}
]
})
*/