2024-08-13
This commit is contained in:
parent
bd804e6083
commit
d26f851139
332 changed files with 1371 additions and 309 deletions
|
|
@ -1,16 +1,36 @@
|
|||
import { fdir } from "fdir";
|
||||
import { resolve } from "node:path";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
const SRC_TYPESCRIPT_PATHS = new fdir()
|
||||
.withBasePath()
|
||||
.glob("**/*.ts")
|
||||
.crawl("web/app/themes/haiku-atelier-2024/src/scripts")
|
||||
.withPromise();
|
||||
|
||||
export default defineConfig({
|
||||
base: "",
|
||||
build: {
|
||||
assetsDir: ".",
|
||||
emptyOutDir: true,
|
||||
/* Génère un fichier manifeste dans outDir */
|
||||
manifest: true,
|
||||
rollupOptions: {
|
||||
input: import.meta.resolve("./web/app/themes/haiku-atelier-2024/src/main.js"),
|
||||
},
|
||||
outDir: import.meta.resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
||||
emptyOutDir: true,
|
||||
target: "es2023",
|
||||
minify: true,
|
||||
outDir: resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
||||
rollupOptions: {
|
||||
input: await SRC_TYPESCRIPT_PATHS,
|
||||
output: {
|
||||
assetFileNames: "[name][extname]",
|
||||
chunkFileNames: "[name][extname]",
|
||||
entryFileNames: "[name].js",
|
||||
compact: true,
|
||||
minifyInternalExports: true,
|
||||
validate: true,
|
||||
},
|
||||
treeshake: "recommended",
|
||||
},
|
||||
sourcemap: true,
|
||||
target: "es2023",
|
||||
write: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue