Skip to content

Commit

Permalink
output assets to /_ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
paigewilliams committed Jul 10, 2024
1 parent c8db479 commit e8b9ef7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions martin-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
_

# Editor directories and files
.vscode/*
Expand Down
2 changes: 1 addition & 1 deletion martin-ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import martinCover from './_assets/logo.png';
import martinCover from './assets/logo.png';
import './App.css';
import styled from 'styled-components';

Expand Down
File renamed without changes.
9 changes: 6 additions & 3 deletions martin-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ export default defineConfig({
plugins: [react()],
build: {
// assets can also be the name of a tile source
// so we use _assets to avoid conflicts
// so we use /_/assets to avoid conflicts
outDir: '_',
rollupOptions: {
output: {
assetFileNames: '_assets/[name].[hash][extname]',
entryFileNames: '[name].[hash].js',
chunkFileNames: '[name].[hash].js',
assetFileNames: 'assets/[name].[hash][extname]',
},
},
},
publicDir: '_assets',
publicDir: '_/assets',
});

0 comments on commit e8b9ef7

Please sign in to comment.