-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
56 lines (51 loc) · 1.88 KB
/
vite.config.js
File metadata and controls
56 lines (51 loc) · 1.88 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
51
52
53
54
55
56
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import { fileURLToPath } from 'url';
// const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
// const __dirname = path.dirname(__filename); // get the name of the directory
console.log( __dirname + '/resources/assets/js/LivretDeTransformation/index.js');
export default defineConfig({
build: {
outDir: '../../public/assets/modules/fcmcommun', // Configuration adaptée pour le dev: pas besoin de publier les assets
//outDir: 'resources/assets/js/dist/', // Configuration de production: les assets sont buildes dans le module et doivent être publiés
emptyOutDir: true,
manifest: true,
rollupOptions: {
output: {
assetFileNames: 'livret-de-transformation.[ext]',
//chunkFileNames: 'client/rsc/[chunks]/[name].[hash].js',
entryFileNames: 'livret-de-transformation.js'
}
}
},
resolve: {
alias: {
"@mingle": path.resolve("/app/vendor/ijpatricio/mingle/resources/js"),
},
},
plugins: [
laravel({
publicDirectory: '../../public',
buildDirectory: 'build-fcmcommun',
input: [
'./resources/assets/js/src/LivretDeTransformation/index.js'
],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
});
export const paths = [
'Modules/FcmCommun/resources/assets/js/src/LivretDeTransformation/index.js',
// 'Modules/FcmCommun/resources/assets/sass/app.scss',
// 'Modules/FcmCommun/resources/assets/js/app.js',
];