From 709ca3edf941b37564a8890af2cb919dde06b4b9 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 3 Oct 2024 12:57:11 +0200 Subject: [PATCH] Mod vite compilation --- .gitignore | 1 + partials/headassets/default.htm | 11 +++++++++++ vite.config.js | 9 +++++---- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 partials/headassets/default.htm diff --git a/.gitignore b/.gitignore index 600404e..137b7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea node_modules build/ +/assets/ diff --git a/partials/headassets/default.htm b/partials/headassets/default.htm new file mode 100644 index 0000000..6d1e2cc --- /dev/null +++ b/partials/headassets/default.htm @@ -0,0 +1,11 @@ +{% if devServerIsRunning %} + + +{% else %} + {% for css in cssPaths %} + + {% endfor %} + {% put scripts %} + + {% endput %} +{% endif %} diff --git a/vite.config.js b/vite.config.js index a1cbe79..fbdb02e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,12 +12,13 @@ export default ({ command }) => { base: command === "serve" ? "/themes/vite-tailwind/" - : "/themes/vite-tailwind/build/", + : "/themes/vite-tailwind/assets/public/", /*base: `${ASSET_URL}`,*/ - publicDir: "fake_dir_so_nothing_gets_copied", + publicDir: "resources/public", build: { - manifest: true, - outDir: "build", + manifest: "manifest.json", + outDir: "assets/public", + assetsDir: "", rollupOptions: { input: `${VITE_INPUT}`, },