You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because the tsconfig that the template comes with has a noEmit flag. Remix takes care of building everything in remix build -- everything excepts what's happening in your express server file. Adding the middleware to tsconfig won't do anything because of noEmit.
That part is a bit confusing, but this is why there's a seperate script in package.json specifically for server.ts in the build step "build:server": "esbuild --platform=node --format=cjs ./server.ts --outdir=./",
There are a couple ways to fix this:
Keep using esbuild & update the script: build:server": "esbuild --platform=node --format=cjs ./server.ts ./server/middlewares/test.ts --outdir=./",
Don't use esbuild and create a new tsconfig profile for the server.
Note that when deploying, you have to make sure the built files are actually shipped. You may want to change the outDir to somewhere else to simplify the process.
Hi,
Thank you for your marvelous examples here :)
I just have a quick question concerning the import
I have a reproductible example here : https://github.com/fchevallieratecna/remix-v2-server
you can
and you'll see
Do you have an idea on how I can import
*.ts
file right from expressserver.ts
files ?The text was updated successfully, but these errors were encountered: