diff --git a/readme.md b/readme.md index a79b14e..51be597 100644 --- a/readme.md +++ b/readme.md @@ -14,6 +14,6 @@ https://ir-engine.github.io/ir-static-build-template/ ## Deploy to github pages +- Enable github pages for the repo - Set STATIC_BUILD_ENABLED to `true` in repo secrets -- Set GITHUB_PAGES to `true` in repo secrets - Set STATIC_BUILD_HOST to your github pages url in repo secrets without https:// (example: `username.github.io/repo-name`) diff --git a/vite.config.ts b/vite.config.ts index 2ebabc9..8afcb57 100755 --- a/vite.config.ts +++ b/vite.config.ts @@ -30,7 +30,7 @@ import path from 'path' import { defineConfig, UserConfig } from 'vite' import manifestJson from './manifest.json' -export default defineConfig(async () => { +export default defineConfig(async ({ command }) => { dotenv.config({ path: packageRoot.path + '/.env.local' }) @@ -81,7 +81,7 @@ export default defineConfig(async () => { plugins: [], build: { target: 'esnext', - sourcemap: 'inline', + sourcemap: process.env.VITE_SOURCEMAPS === 'true' ? true : false, minify: 'esbuild', dynamicImportVarsOptions: { warnOnError: true