Compare commits

...

2 Commits

Author SHA1 Message Date
philipp lang 709ca3edf9 Mod vite compilation
continuous-integration/drone/push Build is passing Details
2024-10-03 12:57:11 +02:00
philipp lang 9fac4cf86c Add shortcut to run production 2024-10-03 12:56:42 +02:00
4 changed files with 19 additions and 5 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
.idea
node_modules
build/
/assets/

View File

@ -9,7 +9,8 @@
"scripts": {
"dev": "vite",
"hot": "vite",
"production": "vite build"
"production": "vite build",
"prod": "npm run production"
},
"keywords": [],
"author": "",

View File

@ -0,0 +1,11 @@
{% if devServerIsRunning %}
<script type="module" src="http://localhost:3000/@vite/client"></script>
<script type="module" src="http://localhost:3000/resources/js/app.js"></script>
{% else %}
{% for css in cssPaths %}
<link rel="stylesheet" href="{{ ('assets/public/' ~ css)|theme }}">
{% endfor %}
{% put scripts %}
<script type="module" src="{{ ('assets/public/' ~ jsPath)|theme }}"></script>
{% endput %}
{% endif %}

View File

@ -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}`,
},