Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ RUN corepack enable
COPY patches ./patches
COPY package.json pnpm-lock.yaml build.sh ./

COPY --from=go-base /bin/hp_ssh.wasm /run/app/hp_ssh.wasm
COPY --from=go-base /bin/wasm_exec.js /run/app/wasm_exec.js
COPY --from=go-base /bin/hp_ssh.wasm /run/public/hp_ssh.wasm
COPY --from=go-base /bin/wasm_exec.js /run/public/wasm_exec.js
RUN ./build.sh --app --app-install-only

COPY . .
Expand Down
8 changes: 4 additions & 4 deletions app/routes/ssh/console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const shouldRevalidate: ShouldRevalidateFunction = () => {

export async function loader({ request, context }: Route.LoaderArgs) {
const origin = new URL(request.url).origin;
const assets = ["/wasm_exec.js", "/hp_ssh.wasm"];
const assets = [`${__PREFIX__}/wasm_exec.js`, `${__PREFIX__}/hp_ssh.wasm`];
const missing: string[] = [];

for (const file of assets) {
Expand Down Expand Up @@ -180,7 +180,7 @@ export async function action({ request, context }: Route.ActionArgs) {
export const links: Route.LinksFunction = () => [
{
rel: "preload",
href: "/hp_ssh.wasm",
href: `${__PREFIX__}/hp_ssh.wasm`,
as: "fetch",
type: "application/wasm",
crossOrigin: "anonymous",
Expand All @@ -190,7 +190,7 @@ export const links: Route.LinksFunction = () => [
export const handle: ExternalScriptsHandle = {
scripts: [
{
src: "/wasm_exec.js",
src: `${__PREFIX__}/wasm_exec.js`,
crossOrigin: "anonymous",
preload: true,
},
Expand All @@ -211,7 +211,7 @@ export default function Page({ loaderData: { ipnDetails, sshDetails } }: Route.C

pause();
const go = new Go(); // Go is defined by wasm_exec.js
WebAssembly.instantiateStreaming(fetch("/hp_ssh.wasm"), go.importObject).then((value) => {
WebAssembly.instantiateStreaming(fetch(`${__PREFIX__}/hp_ssh.wasm`), go.importObject).then((value) => {
go.run(value.instance);
const handle = TsWasmNet(ipnDetails, {
NotifyState: (state) => {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
},
"ignoredBuiltDependencies": [
"better-sqlite3"
]
],
"overrides": {
"@codemirror/state": "6.6.0"
}
}
}
30 changes: 13 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.