25 lines
709 B
JavaScript
25 lines
709 B
JavaScript
/**
|
|
* Build-time only (Chapter 05) — this file never runs on the cPanel host.
|
|
* Two entries: the JS bundle (HTMX+Alpine+Chart.js/Grid.js glue) and the
|
|
* Tailwind CSS entry, each emitting a hashed file + manifest.json so
|
|
* Flask's asset() helper can resolve cache-busted filenames.
|
|
*/
|
|
import { defineConfig } from 'vite';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const root = fileURLToPath(new URL('.', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
manifest: true,
|
|
outDir: 'app/static/dist',
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
input: {
|
|
main: `${root}app/static/src/js/main.js`,
|
|
css: `${root}app/static/src/css/main.css`,
|
|
},
|
|
},
|
|
},
|
|
});
|