@lovable.dev/vite-tanstack-config 1.4.3 → 1.5.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/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") {
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") {
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.0",
4
4
  "description": "Vite config wrapper for Lovable TanStack Start projects",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",