@lovable.dev/vite-tanstack-config 0.0.1 → 1.0.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
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  defineConfig: () => defineConfig
34
34
  });
35
35
  module.exports = __toCommonJS(src_exports);
36
+ var import_lovable_tagger = require("lovable-tagger");
36
37
  var import_vite = require("vite");
37
38
  var SANDBOX_ENV_VAR = "DEV_SERVER__PROJECT_PATH";
38
39
  var LOVABLE_SANDBOX_ENV_VAR = "LOVABLE_SANDBOX";
@@ -71,9 +72,10 @@ function validateProxy(config) {
71
72
  );
72
73
  }
73
74
  } else if (proxyConfig) {
74
- if (proxyConfig.target && isExternalUrl(String(proxyConfig.target))) {
75
+ const target = typeof proxyConfig.target === "string" ? proxyConfig.target : void 0;
76
+ if (target && isExternalUrl(target)) {
75
77
  logWarning(
76
- `Proxy '${path}' targets external URL: ${proxyConfig.target}. This may cause issues in the sandbox environment.`
78
+ `Proxy '${path}' targets external URL: ${target}. This may cause issues in the sandbox environment.`
77
79
  );
78
80
  }
79
81
  if (proxyConfig.ws) {
@@ -246,13 +248,16 @@ function devServerFnErrorLogger() {
246
248
  };
247
249
  }
248
250
  function defineConfig(options = {}) {
249
- return async ({ command, mode: _mode }) => {
251
+ return async ({ command, mode }) => {
250
252
  const isSandbox = isSandboxEnvironment();
251
253
  const internalPlugins = [];
252
254
  const tailwindcss = (await import("@tailwindcss/vite")).default;
253
255
  internalPlugins.push(tailwindcss());
254
256
  const tsConfigPaths = (await import("vite-tsconfig-paths")).default;
255
257
  internalPlugins.push(tsConfigPaths({ projects: ["./tsconfig.json"] }));
258
+ if (command === "serve" && mode === "development") {
259
+ internalPlugins.push((0, import_lovable_tagger.componentTagger)());
260
+ }
256
261
  if (options.clientErrorLogger !== false) {
257
262
  internalPlugins.push(devClientErrorLogger());
258
263
  }
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/index.ts
2
+ import { componentTagger } from "lovable-tagger";
2
3
  import { mergeConfig } from "vite";
3
4
  var SANDBOX_ENV_VAR = "DEV_SERVER__PROJECT_PATH";
4
5
  var LOVABLE_SANDBOX_ENV_VAR = "LOVABLE_SANDBOX";
@@ -37,9 +38,10 @@ function validateProxy(config) {
37
38
  );
38
39
  }
39
40
  } else if (proxyConfig) {
40
- if (proxyConfig.target && isExternalUrl(String(proxyConfig.target))) {
41
+ const target = typeof proxyConfig.target === "string" ? proxyConfig.target : void 0;
42
+ if (target && isExternalUrl(target)) {
41
43
  logWarning(
42
- `Proxy '${path}' targets external URL: ${proxyConfig.target}. This may cause issues in the sandbox environment.`
44
+ `Proxy '${path}' targets external URL: ${target}. This may cause issues in the sandbox environment.`
43
45
  );
44
46
  }
45
47
  if (proxyConfig.ws) {
@@ -212,13 +214,16 @@ function devServerFnErrorLogger() {
212
214
  };
213
215
  }
214
216
  function defineConfig(options = {}) {
215
- return async ({ command, mode: _mode }) => {
217
+ return async ({ command, mode }) => {
216
218
  const isSandbox = isSandboxEnvironment();
217
219
  const internalPlugins = [];
218
220
  const tailwindcss = (await import("@tailwindcss/vite")).default;
219
221
  internalPlugins.push(tailwindcss());
220
222
  const tsConfigPaths = (await import("vite-tsconfig-paths")).default;
221
223
  internalPlugins.push(tsConfigPaths({ projects: ["./tsconfig.json"] }));
224
+ if (command === "serve" && mode === "development") {
225
+ internalPlugins.push(componentTagger());
226
+ }
222
227
  if (options.clientErrorLogger !== false) {
223
228
  internalPlugins.push(devClientErrorLogger());
224
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/vite-tanstack-config",
3
- "version": "0.0.1",
3
+ "version": "1.0.0",
4
4
  "description": "Vite config wrapper for Lovable TanStack Start projects",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -25,6 +25,9 @@
25
25
  "config"
26
26
  ],
27
27
  "license": "MIT",
28
+ "dependencies": {
29
+ "lovable-tagger": "1.1.13"
30
+ },
28
31
  "peerDependencies": {
29
32
  "vite": ">=5.0.0 <9.0.0",
30
33
  "@tailwindcss/vite": ">=4.0.0",