Skip to content

Commit

Permalink
add base-href
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbaker1 committed Aug 5, 2023
1 parent 45d0ef5 commit b8bc99f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build string-bean-wasm --target web
- name: Build Web
env:
BASE_HREF: '/string-bean'
run: |
cd web
npm i && npm run build
Expand Down
10 changes: 8 additions & 2 deletions web/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';

const base = process.env.BASE_HREF ?? '';

/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
Expand All @@ -11,9 +13,13 @@ const config = {
pages: 'build',
assets: 'build',
precompress: false,
strict: true
})
strict: true,
}),
paths: {
base
}
},

preprocess: vitePreprocess(),
};

Expand Down

0 comments on commit b8bc99f

Please sign in to comment.