Skip to content

Commit

Permalink
chore: update logic to find source in github page
Browse files Browse the repository at this point in the history
  • Loading branch information
btxTruong committed Mar 28, 2024
1 parent f49068a commit b3cc215
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import packageJson from './package.json'

/*
* We need repo name to correct endpoint of github page
*/
const REPO = packageJson.name

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -14,8 +20,8 @@ export default defineConfig({
index: 'index.html',
},
output: {
chunkFileNames: `[name].[hash].js`,
entryFileNames: `[name].js`,
chunkFileNames: `${REPO}/[name].[hash].js`,
entryFileNames: `${REPO}/[name].js`,
assetFileNames: `[name].[ext]`,
sourcemapExcludeSources: true,
},
Expand Down

0 comments on commit b3cc215

Please sign in to comment.