Try to do some intelligent stuff

This commit is contained in:
samy
2025-07-26 19:26:02 -10:00
parent debc517cfd
commit 763e722197
3 changed files with 44 additions and 13 deletions
+10 -10
View File
@@ -1,11 +1,11 @@
{ {
"name": "@e-ops-pf/starter-kit", "name": "@e-ops-pf/starter-kit",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "vite build" "build": "vite build"
}, },
"devDependencies": { "devDependencies": {
"vite": "^5.0.0" "vite": "^5.0.0"
} }
} }
+18
View File
@@ -0,0 +1,18 @@
@source inline('loading-bars loading-infinity loading-circle loading-spinner loading-ring loading-ball')
#loading-overlay {
display: none;
position: fixed;
top:0;
left:0;
width: 100%;
height: 100%;
min-height: 100vh;
background: rgba(45, 45, 65, 0.6);
z-index: 100;
}
#loading-overlay div {
margin: auto;
}
+16 -3
View File
@@ -3,12 +3,25 @@ import path from 'path'
export default defineConfig({ export default defineConfig({
build: { build: {
outDir: 'public/js/e-ops-pf/starter-kit', outDir: 'public', // we handle subfolders manually
emptyOutDir: true, emptyOutDir: true,
rollupOptions: { rollupOptions: {
input: 'resources/js/app.js', input: {
js: 'resources/js/app.js',
css: 'resources/css/app.css',
},
output: { output: {
entryFileNames: 'app.js', entryFileNames: (chunkInfo) => {
return chunkInfo.name === 'js'
? 'js/e-ops-pf/starter-kit/app.js'
: 'css/e-ops-pf/starter-kit/app.js' // css is still treated as a chunk
},
assetFileNames: (assetInfo) => {
if (assetInfo.name.endsWith('.css')) {
return 'css/e-ops-pf/starter-kit/app.css'
}
return 'assets/[name].[ext]'
},
}, },
}, },
}, },