@rpcbase/vite 0.81.0 → 0.83.0
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/index.js +10 -5
- package/package.json +1 -2
package/index.js
CHANGED
|
@@ -95,8 +95,7 @@ const integratedPackages = [
|
|
|
95
95
|
"posthog-js/react",
|
|
96
96
|
"posthog-node",
|
|
97
97
|
"react-router",
|
|
98
|
-
"react-hook-form"
|
|
99
|
-
"react-use"
|
|
98
|
+
"react-hook-form"
|
|
100
99
|
]
|
|
101
100
|
|
|
102
101
|
// Add each integrated package to resolveAliases
|
|
@@ -105,6 +104,12 @@ integratedPackages.forEach(pkg => {
|
|
|
105
104
|
resolveAliases[pkg] = resolved
|
|
106
105
|
})
|
|
107
106
|
|
|
107
|
+
// Force PostHog React imports to resolve to the ESM bundle to avoid Node ESM
|
|
108
|
+
// directory import errors while keeping SSR compatibility.
|
|
109
|
+
const posthogReactEsm = resolveIntegratedPackagePath("posthog-js/react/dist/esm/index.js")
|
|
110
|
+
resolveAliases["posthog-js/react"] = posthogReactEsm
|
|
111
|
+
resolveAliases["posthog-js/react/dist/esm/index.js"] = posthogReactEsm
|
|
112
|
+
|
|
108
113
|
export {resolveAliases}
|
|
109
114
|
|
|
110
115
|
const rbPackagesNeedingEnvPolyfill = [
|
|
@@ -153,8 +158,8 @@ const getBaseConfig = ({ command, mode, isSsrBuild, isPreview }) => {
|
|
|
153
158
|
inlinePattern: ["**/*.css"],
|
|
154
159
|
removeViteModuleLoader: false
|
|
155
160
|
}),
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
|
|
162
|
+
isProduction && posthogSourcemapsPlugin({}),
|
|
158
163
|
].filter(Boolean),
|
|
159
164
|
define: {
|
|
160
165
|
__vite_env__: runtimeEnv,
|
|
@@ -200,7 +205,7 @@ const getBaseConfig = ({ command, mode, isSsrBuild, isPreview }) => {
|
|
|
200
205
|
],
|
|
201
206
|
noExternal: [
|
|
202
207
|
...rbPackagesNeedingEnvPolyfill,
|
|
203
|
-
"react-use",
|
|
208
|
+
// "react-use",
|
|
204
209
|
],
|
|
205
210
|
},
|
|
206
211
|
optimizeDeps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"react-dom": "19.2.0",
|
|
40
40
|
"react-hook-form": "7.66.0",
|
|
41
41
|
"react-router": "7.9.6",
|
|
42
|
-
"react-use": "17.6.0",
|
|
43
42
|
"tailwindcss": "4.1.17",
|
|
44
43
|
"validator": "13.15.23",
|
|
45
44
|
"vite": "7.2.2",
|