@lovable.dev/vite-tanstack-config 1.4.3 → 1.5.1

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/index.cjs CHANGED
@@ -210,7 +210,17 @@ function defineConfig(configOrOptions = {}) {
210
210
  }
211
211
  }
212
212
  const { tanstackStart } = await import("@tanstack/react-start/plugin/vite");
213
- internalPlugins.push(tanstackStart(options.tanstackStart));
213
+ const tanstackStartDefaults = {
214
+ importProtection: {
215
+ behavior: "error",
216
+ client: {
217
+ files: ["**/server/**"],
218
+ specifiers: ["server-only"]
219
+ }
220
+ }
221
+ };
222
+ const tanstackStartOptions = (0, import_vite.mergeConfig)(tanstackStartDefaults, options.tanstackStart ?? {});
223
+ internalPlugins.push(tanstackStart(tanstackStartOptions));
214
224
  const viteReact = (await import("@vitejs/plugin-react")).default;
215
225
  internalPlugins.push(viteReact(options.react));
216
226
  if (command === "serve") {
@@ -222,6 +232,10 @@ function defineConfig(configOrOptions = {}) {
222
232
  internalPlugins.push(hmrGatePlugin(hmrGateOptions));
223
233
  }
224
234
  }
235
+ if (command === "serve" && isSandbox) {
236
+ const { devServerBridgePlugin } = await import("@lovable.dev/vite-plugin-dev-server-bridge");
237
+ internalPlugins.push(devServerBridgePlugin());
238
+ }
225
239
  if (command === "serve" && mode === "development") {
226
240
  internalPlugins.push((0, import_lovable_tagger.componentTagger)());
227
241
  }
package/dist/index.js CHANGED
@@ -176,7 +176,17 @@ function defineConfig(configOrOptions = {}) {
176
176
  }
177
177
  }
178
178
  const { tanstackStart } = await import("@tanstack/react-start/plugin/vite");
179
- internalPlugins.push(tanstackStart(options.tanstackStart));
179
+ const tanstackStartDefaults = {
180
+ importProtection: {
181
+ behavior: "error",
182
+ client: {
183
+ files: ["**/server/**"],
184
+ specifiers: ["server-only"]
185
+ }
186
+ }
187
+ };
188
+ const tanstackStartOptions = mergeConfig(tanstackStartDefaults, options.tanstackStart ?? {});
189
+ internalPlugins.push(tanstackStart(tanstackStartOptions));
180
190
  const viteReact = (await import("@vitejs/plugin-react")).default;
181
191
  internalPlugins.push(viteReact(options.react));
182
192
  if (command === "serve") {
@@ -188,6 +198,10 @@ function defineConfig(configOrOptions = {}) {
188
198
  internalPlugins.push(hmrGatePlugin(hmrGateOptions));
189
199
  }
190
200
  }
201
+ if (command === "serve" && isSandbox) {
202
+ const { devServerBridgePlugin } = await import("@lovable.dev/vite-plugin-dev-server-bridge");
203
+ internalPlugins.push(devServerBridgePlugin());
204
+ }
191
205
  if (command === "serve" && mode === "development") {
192
206
  internalPlugins.push(componentTagger());
193
207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "1.4.3",
3
+ "version": "1.5.1",
4
4
  "description": "Vite config wrapper for Lovable TanStack Start projects",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -26,6 +26,7 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
+ "@lovable.dev/vite-plugin-dev-server-bridge": "^1.0.0",
29
30
  "@lovable.dev/vite-plugin-hmr-gate": "^1.0.0",
30
31
  "lovable-tagger": "1.2.0"
31
32
  },