diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-08-24 13:03:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-08-24 13:03:56 -0700 |
| commit | 5dc264e08253c3a97ea41d1fde5fbf3f33dd6591 (patch) | |
| tree | 0db325e5e280176702263d28817c371abce050db /static/vite.config.ts | |
| parent | 6f374aac7f4d553c484eecc77c9599be79f2d834 (diff) | |
| download | kennel.hatecomputers.club-5dc264e08253c3a97ea41d1fde5fbf3f33dd6591.tar.gz kennel.hatecomputers.club-5dc264e08253c3a97ea41d1fde5fbf3f33dd6591.zip | |
bring in jQuery, build with Vite
Diffstat (limited to 'static/vite.config.ts')
| -rw-r--r-- | static/vite.config.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/static/vite.config.ts b/static/vite.config.ts new file mode 100644 index 0000000..0582da4 --- /dev/null +++ b/static/vite.config.ts @@ -0,0 +1,27 @@ +import { fileURLToPath, URL } from "node:url"; +import { dynamicBase } from "vite-plugin-dynamic-base"; +import { defineConfig } from "vite"; +import inject from "@rollup/plugin-inject"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + dynamicBase({ + // dynamic public path var string, default window.__dynamic_base__ + publicPath: "", + // dynamic load resources on index.html, default false. maybe change default true + transformIndexHtml: false, + }), + inject({ + // => that should be first under plugins array + $: "jquery", + jQuery: "jquery", + }), + ], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)), + }, + }, + base: "/static/", +}); |
