@solidjs/vite-plugin 3.0.0-next.35 → 3.0.0-next.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +14 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +15 -1
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -3521,6 +3521,20 @@ function solidPlugin(options = {}) {
|
|
|
3521
3521
|
// real server build resolves (isServer true).
|
|
3522
3522
|
...(isTestMode && !serverTestPosture && !opts.isSsrTargetWebworker ? ['browser'] : []), ...config.resolve.conditions];
|
|
3523
3523
|
|
|
3524
|
+
// `resolve.conditions` above only governs modules Vite inlines.
|
|
3525
|
+
// Externalized server deps are resolved by `fetchModule` with
|
|
3526
|
+
// `resolve.externalConditions` (default `['node', 'module-sync']`) and
|
|
3527
|
+
// handed to the module runner as concrete file paths — without
|
|
3528
|
+
// `development` there, packages that select their dev build through
|
|
3529
|
+
// the `development` export condition (@solidjs/web's server-functions
|
|
3530
|
+
// runtime among them) run their PRODUCTION copy under `vite dev`:
|
|
3531
|
+
// server errors reach the client sanitized to "Internal Server Error"
|
|
3532
|
+
// instead of carrying the real message, dev-only diagnostics vanish.
|
|
3533
|
+
// So the dev flag has to reach both lists.
|
|
3534
|
+
if (replaceDev && config.consumer !== 'client' && name !== 'client') {
|
|
3535
|
+
config.resolve.externalConditions = ['development', ...(config.resolve.externalConditions ?? vite.defaultExternalConditions)];
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3524
3538
|
// Set resolve.noExternal and resolve.external for the SSR environment.
|
|
3525
3539
|
// Only set resolve.external if noExternal is not true (to avoid conflicts with plugins like Cloudflare)
|
|
3526
3540
|
if (name === 'ssr' && solidPkgsConfig) {
|