Skip to content

Commit

Permalink
Reconfig vite output dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
leegee committed Oct 18, 2024
1 parent af4fb5a commit 8fb5518
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ dist-ssr
*.sw?
.react-app
.vite-app
*.tsbuildinfo
*.tsbuildinfo
13 changes: 9 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/
export default defineConfig({
base: './',
publicDir: 'assets',

build: {
sourcemap: true,
rollupOptions: {
output: {
// Customize the output directory structure
assetFileNames: 'assets/[name][extname]', // Control asset names
},
},
},

plugins: [
Expand All @@ -19,7 +24,7 @@ export default defineConfig({
"name": "MIDI Phase Experiments",
"short_name": "MIDI Phase",
"start_url": ".",
"description": "Experiments in phasing MIDI with interferance patterns",
"description": "Experiments in phasing MIDI with interference patterns",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#242424",
Expand Down Expand Up @@ -48,7 +53,7 @@ export default defineConfig({
]
},
workbox: {
swDest: "assets/sw.js",
swDest: "dist/registerSW.js", // Set this to output directly to the dist folder
runtimeCaching: [
{
urlPattern: /\.(?:png|svg)$/,
Expand All @@ -65,4 +70,4 @@ export default defineConfig({
},
}),
],
});
});

0 comments on commit 8fb5518

Please sign in to comment.