-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix: special handling for ssr.noExternal in mergeConfig #4766
Conversation
@frandiox would you add an inline plugin in the playground where the |
029442b
to
b15235d
Compare
@patak-js Thanks, I've updated the commit! |
NICE thanks @frandiox |
@patak-dev @bluwy Hey 👋 it looks like this feature has been modified (maybe here)? We are still doing Just wanted to start the conversation to see if you have any workaround from the top of your mind. I can also submit a repro in a few days (traveling at the moment). |
I think you can mutate the config after remix, something like this? defineConfig({
plugins: [
remix(),
{
name: "workaround",
config(config) {
delete config.ssr.external
}
}
]
}) |
Yeah @hi-ogawa's solution would be one way around it. For the linked remix code, perhaps you can also conditionally external them only in dev? (If it's a build issue). The change for how |
Remix fixed this in their latest release. However, I wonder how should we approach this if another user-land plugin adds something to
It's also for dev because we were using the Runtime API to run on workerd.
Yeah I see the utility. However, when targetting worker environments I think there's no actual way to make anything external 🤔 ssr: {
noExternal: true,
target: 'webworker',
}, Or maybe there is if the worker supports imports... unsure. |
Description
The new
ssr.noExternal: true
feature added recently offers a way to bundle all the dependencies. However, if a plugin also addsssr.noExternal: ['one-dependency']
in its own config, Vite will give priority to the latter over the boolean because it has an object type.This PR adds a special handling for
noExternal
key to avoid overriding the boolean value since it's actually a superset of any object value.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).