-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(remix-dev/compiler): support native .node
files
#2629
Conversation
Hi @nicksrandall, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
|
Sorry @nicksrandall, I did a whopsy while trying to change the base branch (code changes need to target |
f2c62d1
to
ab1cf6c
Compare
.node
files
.node
files.node
files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicksrandall I closed #3263 by @benwis in favor of this one, since you started first on this idea.
Could you please look into that PR & see if we also want to only enable this plugin on node based platforms?
Can you also check if we need the extra compiler changes that were implemented.
Copying over the docs would be a good thing as well I think (please add @benwis as a co-author & in the contributors
list)
@MichaelDeBoey I don't particularly care which PR gets merged, but I have no ability to edit this here. I think you need the node system check, the compiler changes, the path detection code, and everything else I had to do in my PR. We're running this change in Prod right now to serve .node files, and it seems to work well. |
@benwis I'll give you access to my branch. I also don't care which PR gets merged so if it's easier to close then and re-open yours, we can do that. |
@nicksrandall Thanks for inviting me! I'm happy to do it here, I'll dig in and address the comments today. I'd love to see this and the WASM changes merged! |
Let's keep this branch open then 👍 |
@MichaelDeBoey @nicksrandall I have updated this repo for the changes in Remix 1.7.1 and reapplied the changes made, plus some of mine. I'm not sure how to get this pull request to update based on the status of the dev branch of the parent repo though. It seems to be stuck. |
@MichaelDeBoey any updates on this. This is a blocker for me. |
@nicksrandall Please rebase your branch onto latest |
@nicksrandall I'd like to get this merged but there are comments left by @jacob-ebey that still haven't been addressed, and the server compiler code was moved into |
I'll look at this today and see if I can get it updated. |
5f56a00
to
663a9d5
Compare
@chaance The solutions here has gotten more simple since esbuild added support for the See: evanw/esbuild#1051 (comment) This should just work when app imports a One potential gotcha that I feel like I should point out is that packages that ship In such a case, the user will just need to mark the package as "external" (or in Remix case, exclude it from being bundled) and then it should just work. |
@benwis I know you also worked on this... You comfortable just using the |
I think that's probably fine for now. The same is true for any other dynamic file import. |
663a9d5
to
51aa1e1
Compare
I think that's probably fine as well, although I haven't found time to test it :) |
51aa1e1
to
2fec55f
Compare
🤖 Hello there, We just published version Thanks! |
I am still running into this issue when trying to install adminjs.
|
This PR enables support for users to include "native" (
.node
) modules into their server bundles (when using NodeJS).Libraries like
sharp
(awesome for for image processing) are written in a lower-level language than NodeJS and then are compiled as a "native" module to be used in a Node environment.Discussion: #2560