Skip to content

Commit

Permalink
chore: fix start and build
Browse files Browse the repository at this point in the history
  • Loading branch information
timurbazhirov committed Jan 16, 2025
1 parent 93b1d1e commit 9ad03a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0",
"description": "Web-based Atomic Viewer and Editor in JavaScript.",
"scripts": {
"build": "vite build",
"start": "vite start",
"build": "npm run transpile && vite build --config vite.config.ts",
"start": "vite",
"transpile": "tsc && npm run copy-css",
"copy-css": "mkdir -p dist/stylesheets && cp src/stylesheets/* dist/stylesheets/",
"prestart": "npm-link-shared ./node_modules/@exabyte-io/cove.js/node_modules . react",
Expand Down
1 change: 0 additions & 1 deletion start/src

This file was deleted.

7 changes: 7 additions & 0 deletions start/vite.config.ts → vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ export default defineConfig({
},
build: {
outDir: "build",
rollupOptions: {
output: {
entryFileNames: "main.js", // Name the main output bundle as main.js
chunkFileNames: "[name]-[hash].js", // Optional: Name for dynamic imports or shared chunks
assetFileNames: "[name]-[hash].[ext]", // Optional: Name for assets like CSS or images
},
},
},
});

0 comments on commit 9ad03a4

Please sign in to comment.