vite-plugin-vanjs 0.1.1 → 0.1.2
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/plugin/index.mjs +12 -3
package/package.json
CHANGED
package/plugin/index.mjs
CHANGED
|
@@ -133,13 +133,22 @@ export default function VitePluginVanJS(options = {}) {
|
|
|
133
133
|
);
|
|
134
134
|
|
|
135
135
|
// Resolve early when source already resolved. EG: @vanjs/van
|
|
136
|
-
if (
|
|
136
|
+
if (
|
|
137
|
+
(ops.ssr || isTest) &&
|
|
138
|
+
(source === setupResolved || setupResolved.includes(source))
|
|
139
|
+
) {
|
|
137
140
|
return setupResolved;
|
|
138
141
|
}
|
|
139
|
-
if (
|
|
142
|
+
if (
|
|
143
|
+
(ops.ssr || isTest) &&
|
|
144
|
+
(source === resolvedVan || resolvedVan.includes(source))
|
|
145
|
+
) {
|
|
140
146
|
return resolvedVan;
|
|
141
147
|
}
|
|
142
|
-
if (
|
|
148
|
+
if (
|
|
149
|
+
(ops.ssr || isTest) &&
|
|
150
|
+
(source === resolvedVanX || resolvedVanX.includes(source))
|
|
151
|
+
) {
|
|
143
152
|
return resolvedVanX;
|
|
144
153
|
}
|
|
145
154
|
|