drupal-caravane/web/themes/custom/caravane/vite.config.js

41 lines
1.1 KiB
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
hmr: {
host: 'localhost',
},
watch: {
usePolling: true,
},
},
build: {
outDir: 'assets/dist',
rollupOptions: {
input: {
main: 'assets/js/main.js',
redirect: 'assets/js/redirect'
},
output: {
entryFileNames: '[name].js',
assetFileNames: 'main.css'
}
}
},
resolve: {
alias: {
'@api': fileURLToPath(new URL('api', import.meta.url)),
// '@': fileURLToPath(new URL('./src', import.meta.url)),
// '@stores': fileURLToPath(new URL('./src/stores', import.meta.url)),
// '@components': fileURLToPath(new URL('./src/components', import.meta.url)),
// '@views': fileURLToPath(new URL('./src/views', import.meta.url)),
// // '@icons': fileURLToPath(new URL('./node_modules/vue-material-design-icons', import.meta.url)),
// '@node_modules': fileURLToPath(new URL('./node_modules', import.meta.url))
}
}
})