Replies: 1 comment 1 reply
-
I also tried just transpiling before serving but the JS parts wouldn't work I suppose because esbuild would refuse to bundle it as self executing function i think. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
app.get('/static/:scriptName{.+.tsx?}', esbuildTranspiler({ wasmModule: wasm }))
// app.get('/static/*', serveStatic({ root: './' }))
Where I then try to serve a bunch of client side libraries, what happens instead is that the bundle has miniflare live reload code along with some of the jsx templates. jsLibsClient.tsx:2 Uncaught SyntaxError: Unexpected token '<' (at jsLibsClient.tsx:2:1). The actual contents of the file are:
import "beercss/dist/cdn/beer.min.css";
import beercss from "beercss/dist/cdn/beer.min.js";
import "hyperscript.org"
import "htmx.org"
import { loadScript } from "@paypal/paypal-js";
import Clerk from '@clerk/clerk-js'
Beta Was this translation helpful? Give feedback.
All reactions