50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
import basicSsl from '@vitejs/plugin-basic-ssl';
|
|
|
|
export default defineConfig({
|
|
base: './', // This makes all assets use relative paths
|
|
plugins: [
|
|
basicSsl(),
|
|
tailwindcss(),
|
|
viteStaticCopy({
|
|
targets: [
|
|
//{
|
|
// src: 'images/*',
|
|
// dest: 'images',
|
|
//},
|
|
],
|
|
}),
|
|
],
|
|
server: {
|
|
host: true,
|
|
watch: {
|
|
usePolling: true,
|
|
},
|
|
},
|
|
build: {
|
|
minify: false,
|
|
terserOptions: {
|
|
compress: false,
|
|
mangle: false,
|
|
},
|
|
rollupOptions: {
|
|
input: {
|
|
main: 'index.html',
|
|
},
|
|
output: {
|
|
format: 'iife',
|
|
entryFileNames: '[name].js',
|
|
chunkFileNames: '[name]-[hash].js',
|
|
assetFileNames: 'assets/[name]-[hash].[ext]',
|
|
sanitizeFileName: name => name.replace(/\.[jt]sx?$/, ''),
|
|
},
|
|
},
|
|
assetsInlineLimit: 0,
|
|
target: 'esnext',
|
|
modulePreload: false,
|
|
cssCodeSplit: false,
|
|
},
|
|
});
|