rari 0.2.3 → 0.2.4
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/package.json +1 -1
- package/src/vite/index.ts +6 -1
package/package.json
CHANGED
package/src/vite/index.ts
CHANGED
|
@@ -603,6 +603,7 @@ if (import.meta.hot) {
|
|
|
603
603
|
if (id.includes('.css') || id.includes('polyfill')) {
|
|
604
604
|
return true
|
|
605
605
|
}
|
|
606
|
+
// Preserve side effects for React modules to prevent import issues
|
|
606
607
|
if (
|
|
607
608
|
id.includes('react-dom')
|
|
608
609
|
|| id.includes('react')
|
|
@@ -610,9 +611,13 @@ if (import.meta.hot) {
|
|
|
610
611
|
|| id.includes('react-dom/client')
|
|
611
612
|
|| id.includes('react-dom/server')
|
|
612
613
|
) {
|
|
614
|
+
return true
|
|
615
|
+
}
|
|
616
|
+
// Only disable side effects for specific safe modules
|
|
617
|
+
if (id.includes('node_modules') && !id.includes('react')) {
|
|
613
618
|
return false
|
|
614
619
|
}
|
|
615
|
-
return
|
|
620
|
+
return true
|
|
616
621
|
},
|
|
617
622
|
unknownGlobalSideEffects: false,
|
|
618
623
|
}
|