2024-10-03 16:17:51 +02:00
|
|
|
import liveReload from 'vite-plugin-live-reload';
|
|
|
|
import VitePluginSvgSpritemap from '@spiriit/vite-plugin-svg-spritemap';
|
2024-02-12 21:44:41 +01:00
|
|
|
|
2024-10-03 16:17:51 +02:00
|
|
|
export default ({command}) => {
|
|
|
|
return {
|
|
|
|
base: command === 'serve' ? '/themes/vite-tailwind/' : '/themes/vite-tailwind/assets/public/',
|
|
|
|
publicDir: 'resources/public',
|
|
|
|
build: {
|
|
|
|
manifest: 'manifest.json',
|
|
|
|
outDir: 'assets/public',
|
|
|
|
assetsDir: '',
|
|
|
|
rollupOptions: {
|
|
|
|
input: 'resources/js/app.js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
strictPort: true,
|
|
|
|
port: 3000,
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.js', '.mjs'],
|
|
|
|
},
|
|
|
|
plugins: [liveReload('./**/*.htm'), VitePluginSvgSpritemap('./resources/icons/*.svg')],
|
|
|
|
};
|
2024-02-12 21:44:41 +01:00
|
|
|
};
|