Skip to content

Commit 4284bf9

Browse files
committed
Fix asset paths for the ProtoLab custom domain
1 parent 59ae874 commit 4284bf9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm ci
1313
npm run dev
1414
```
1515

16-
Open the local URL printed by Vite. The default development port is `8080`, with the application at `http://localhost:8080/ProtoLab-3D/`.
16+
Open the local URL printed by Vite. The default development port is `8080`, with the application at `http://localhost:8080/`.
1717

1818
```sh
1919
npm run typecheck
@@ -22,7 +22,7 @@ npm run build
2222
npm run preview
2323
```
2424

25-
The production output is `dist/`. Vite uses the explicit base `/ProtoLab-3D/` for the GitHub Pages repository path, including local development and reference images. The GitHub Actions Pages workflow builds and uploads this directory; enable **Settings → Pages → Source → GitHub Actions** in the repository.
25+
The production output is `dist/`. Vite uses `/` as the base for the custom domain `https://protolab.defencore.com/`, including JavaScript, styles and reference images. The GitHub Actions Pages workflow builds and uploads this directory; enable **Settings → Pages → Source → GitHub Actions** and set the custom domain in the repository. Deploying instead to a repository URL such as `https://defencore.github.io/ProtoLab-3D/` requires changing the Vite base to `/ProtoLab-3D/` before rebuilding.
2626

2727
## Working with parts
2828

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { partModulesPlugin } from './scripts/part-modules/vite-plugin';
44

55
export default defineConfig({
66
plugins: [partModulesPlugin(), react()],
7-
base: '/ProtoLab-3D/',
7+
base: '/',
88
build: {
99
rollupOptions: {
1010
output: {

0 commit comments

Comments
 (0)