36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({mode}) => {
|
|
return {
|
|
plugins: [
|
|
vue({
|
|
template: {
|
|
compilerOptions: {
|
|
isCustomElement: (tag) => tag.includes('event-form') || tag.includes('event-index') || tag.includes('event-description'),
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
build: {
|
|
manifest: 'manifest.json',
|
|
rollupOptions: {
|
|
input: 'src/main.js',
|
|
output: {
|
|
entryFileNames: mode === 'import' ? `assets/[name].js` : `assets/[name]-[hash].js`,
|
|
chunkFileNames: mode === 'import' ? `assets/[name].js` : `assets/[name]-[hash].js`,
|
|
assetFileNames: mode === 'import' ? `assets/[name].[ext]` : `assets/[name]-[hash].[ext]`,
|
|
}
|
|
}
|
|
},
|
|
define: {
|
|
'process.env': process.env,
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
host: '0.0.0.0',
|
|
},
|
|
};
|
|
});
|