Commit 64a87a4
fix(icp-dapp-launcher): use production II URL and fix JS asset paths on IC (#271)
* fix(icp-dapp-launcher): use production II URL and fix JS asset paths on IC
Two bugs prevented correct production deployment:
1. deploy-launcher.sh ran `icp deploy` without first running `npm run build`.
The `icp` tool only uploads the existing build/ directory — it never invokes
Vite. So ICP_NETWORK=ic had no effect and PROD was always false, embedding
the local dev II URL (rdmx6-jaaaa...) instead of https://id.ai.
Fix: explicitly build with ICP_NETWORK=ic before deploying.
2. trailingSlash='ignore' caused SvelteKit to output launch.html with relative
asset paths like ./_app/... The ICP HTTP gateway redirects /launch → /launch/
(trailing slash) because files exist under /launch/. At /launch/, the paths
resolve to /launch/_app/... which doesn't exist, so the asset canister
returns its HTML fallback — causing the 'text/html' MIME type error on JS
module scripts.
Fix: trailingSlash='always' generates launch/index.html with ../_app/...
paths that resolve correctly from /launch/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: bump pocket-ic crate to 13.0.0 to match server binary
Local PocketIC server binary is v13.0.0 but the workspace crate was
pinned to 12.0.0 (which rejects >=13). Bumping to 13.0.0 resolves the
version mismatch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: bump icp-dapp-launcher version (patch)
* fix(icp-dapp-launcher): hardcode mainnet canister IDs as fallback
wasm-registry and demos now default to mainnet IDs so local dev and
production both work without VITE_* env vars set. The VITE_* override
is kept for CI, where local canisters are deployed with different IDs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2dd722f commit 64a87a4
7 files changed
Lines changed: 25 additions & 20 deletions
File tree
- canisters/icp-dapp-launcher
- src
- lib/constants
- routes
- scripts
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
0 commit comments