1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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/",
});
|