mcansh / remix-fastify

Fastify server request handler for Remix
https://remix-fastify.onrender.com
MIT License
194 stars 29 forks source link

Remix v2 breaks remix-fastify #121

Closed rolanday closed 1 year ago

rolanday commented 1 year ago

Fyi, just in case you're not already aware. Upgrading to remix v2 results in following error on startup:

[redacted]/node_modules/@mcansh/remix-fastify/dist/index.mjs:12
  AbortController,
  ^^^^^^^^^^^^^^^
SyntaxError: Named export 'AbortController' not found. The requested module '@remix-run/node' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
mcansh commented 1 year ago

working on an update for a few things including (i think) removing the plugin in favor of having all the logic in your server.js file to better support HMR/HDR

rolanday commented 1 year ago

Thanks Logan. Super appreciate!

dimatakoy commented 1 year ago

Thanks for your work ❤️

mcansh commented 1 year ago

available as 0.0.0-experimental-c6eaa54 or under the experimental npm tag, merging and cutting v3.0.0 tomorrow!

make sure to check out the updates to https://github.com/mcansh/remix-fastify/blob/remove-plugin/example/server.js

rolanday commented 1 year ago

Ty for fast turn around. Can't get to it tonight but will try out tomorrow and report back. Thanks again!

rolanday commented 1 year ago

Hi Logan, works great, and nice to break out of plug-in model (make it super easy to switch between express/fastify for benchmarking). Not a biggie, but you may want to add @fastify/early-hints to the list of modules to add. Thanks again for updating and thank you for this!

mcansh commented 1 year ago

Hi Logan, works great, and nice to break out of plug-in model (make it super easy to switch between express/fastify for benchmarking). Not a biggie, but you may want to add @fastify/early-hints to the list of modules to add. Thanks again for updating and thank you for this!

@fastify/early-hints is technically an optional dependency as you can just remove the plugin registration and the 4 lines from the server, but I'll add some comments to the server example for that :)

rolanday commented 1 year ago

Thx again Logan! Super appreciate you're making fastify readily available to us remixers :)