-
Notifications
You must be signed in to change notification settings - Fork 375
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
start-node build uses different node-externals logic than dev #127
Comments
That's not bad. I wonder if we aren't supposed to externalize pretty much everything since if Vite didn't pull it in we don't need to. This is really about getting the entry working. |
The one reason coming to my mind, against externalizing everything for the node build is: dev workflow / habits / standards even? 🤔. I imagine that many frontend devs install all of their dependencies as dev dependencies with the logic, that those dependencies are not needed in node_modules after client bundling. (also Docker image size optimization?) If solid-start externalizes every dependency in ssr, that in return means, that the user cannot use devdeps for most of their deps. If they forget, and install one random dependency falsely with Jason's (Preact) Microbundle solves this workflow issues with some trick: it just externalizes all pkg.dependencies and pkg.peerDependencies, which also makes a lot of sense 🙂: |
Yeah we need to do something about the externalizing logic for two reasons:
We could probably use the logic written by @katywings for 1, and use the |
@nksaraf Thank you for your feedback :) |
While there are still issues here related to mono-repos, and linked libraries. I think the main issue here is done we both:
Am I missing anything? |
@ryansolid "pass through external to ssr" thats the important one 💪, tried it out with the redis example and it works ❤️. The ugly thing is that |
@ryansolid Another quick info on this: maybe we should track this on a separate issue, but there is a special detail with dynamic imports. E.g if I have a dynamic import like this: |
That's an interesting suggestion. I'm quite frustrated with this all in general. Svelte's Vitefu helps with Solid packages but having to worry about like random server libraries is pretty painful. I need more opinions cross checks to see if others are handling things this way. |
In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed in mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience. See #1139 for more details. |
IS: During
npm run build
thestart-node
adapter currently runs three build processes, one if them is a pure rollup build.ssr.external
(code).SHOULD:
REPRODUCTION:
redis
) and runnpm run build
MY WORKAROUND:
I locally cloned
start-node
and made the following changes. This allows me to set externals in vite'sssr.external
config consistently across dev/build.Somewhat related: #95
The text was updated successfully, but these errors were encountered: