@tanstack/router-plugin 1.73.1 → 1.76.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.
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const unplugin = require("unplugin");
4
+ const config = require("./core/config.cjs");
5
+ const routerCodeSplitterPlugin = require("./core/router-code-splitter-plugin.cjs");
6
+ const routerGeneratorPlugin = require("./core/router-generator-plugin.cjs");
7
+ const routerComposedPlugin = require("./core/router-composed-plugin.cjs");
8
+ const TanStackRouterGeneratorEsbuild = unplugin.createEsbuildPlugin(
9
+ routerGeneratorPlugin.unpluginRouterGeneratorFactory
10
+ );
11
+ const TanStackRouterCodeSplitterEsbuild = unplugin.createEsbuildPlugin(
12
+ routerCodeSplitterPlugin.unpluginRouterCodeSplitterFactory
13
+ );
14
+ const TanStackRouterEsbuild = unplugin.createEsbuildPlugin(routerComposedPlugin.unpluginRouterComposedFactory);
15
+ exports.configSchema = config.configSchema;
16
+ exports.TanStackRouterCodeSplitterEsbuild = TanStackRouterCodeSplitterEsbuild;
17
+ exports.TanStackRouterEsbuild = TanStackRouterEsbuild;
18
+ exports.TanStackRouterGeneratorEsbuild = TanStackRouterGeneratorEsbuild;
19
+ exports.default = TanStackRouterEsbuild;
20
+ //# sourceMappingURL=esbuild.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.cjs","sources":["../../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { configSchema } from './core/config'\nimport { unpluginRouterCodeSplitterFactory } from './core/router-code-splitter-plugin'\nimport { unpluginRouterGeneratorFactory } from './core/router-generator-plugin'\nimport { unpluginRouterComposedFactory } from './core/router-composed-plugin'\n\nimport type { Config } from './core/config'\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterGeneratorEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterGeneratorEsbuild = createEsbuildPlugin(\n unpluginRouterGeneratorFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterCodeSplitterEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterCodeSplitterEsbuild = createEsbuildPlugin(\n unpluginRouterCodeSplitterFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory)\n\nexport default TanStackRouterEsbuild\n\nexport {\n configSchema,\n TanStackRouterGeneratorEsbuild,\n TanStackRouterCodeSplitterEsbuild,\n TanStackRouterEsbuild,\n}\n\nexport type { Config }\n"],"names":["createEsbuildPlugin","unpluginRouterGeneratorFactory","unpluginRouterCodeSplitterFactory","unpluginRouterComposedFactory"],"mappings":";;;;;;;AAkBA,MAAM,iCAAiCA,SAAA;AAAA,EACrCC,sBAAA;AACF;AAWA,MAAM,oCAAoCD,SAAA;AAAA,EACxCE,yBAAA;AACF;AAWM,MAAA,wBAAwBF,6BAAoBG,qBAA6B,6BAAA;;;;;;"}
@@ -0,0 +1,103 @@
1
+ import { configSchema, Config } from './core/config.cjs';
2
+ /**
3
+ * @example
4
+ * ```ts
5
+ * export default {
6
+ * plugins: [TanStackRouterGeneratorEsbuild()],
7
+ * // ...
8
+ * }
9
+ * ```
10
+ */
11
+ declare const TanStackRouterGeneratorEsbuild: (options?: Partial<{
12
+ routeFileIgnorePrefix: string;
13
+ routesDirectory: string;
14
+ generatedRouteTree: string;
15
+ quoteStyle: "single" | "double";
16
+ semicolons: boolean;
17
+ disableTypes: boolean;
18
+ addExtensions: boolean;
19
+ disableLogging: boolean;
20
+ disableManifestGeneration: boolean;
21
+ apiBase: string;
22
+ routeTreeFileHeader: string[];
23
+ routeTreeFileFooter: string[];
24
+ indexToken: string;
25
+ routeToken: string;
26
+ enableRouteGeneration?: boolean | undefined;
27
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
28
+ routeFilePrefix?: string | undefined;
29
+ routeFileIgnorePattern?: string | undefined;
30
+ autoCodeSplitting?: boolean | undefined;
31
+ experimental?: {
32
+ enableCodeSplitting?: boolean | undefined;
33
+ } | undefined;
34
+ }> | undefined) => import('unplugin').EsbuildPlugin;
35
+ /**
36
+ * @example
37
+ * ```ts
38
+ * export default {
39
+ * plugins: [TanStackRouterCodeSplitterEsbuild()],
40
+ * // ...
41
+ * }
42
+ * ```
43
+ */
44
+ declare const TanStackRouterCodeSplitterEsbuild: (options?: Partial<{
45
+ routeFileIgnorePrefix: string;
46
+ routesDirectory: string;
47
+ generatedRouteTree: string;
48
+ quoteStyle: "single" | "double";
49
+ semicolons: boolean;
50
+ disableTypes: boolean;
51
+ addExtensions: boolean;
52
+ disableLogging: boolean;
53
+ disableManifestGeneration: boolean;
54
+ apiBase: string;
55
+ routeTreeFileHeader: string[];
56
+ routeTreeFileFooter: string[];
57
+ indexToken: string;
58
+ routeToken: string;
59
+ enableRouteGeneration?: boolean | undefined;
60
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
61
+ routeFilePrefix?: string | undefined;
62
+ routeFileIgnorePattern?: string | undefined;
63
+ autoCodeSplitting?: boolean | undefined;
64
+ experimental?: {
65
+ enableCodeSplitting?: boolean | undefined;
66
+ } | undefined;
67
+ }> | undefined) => import('unplugin').EsbuildPlugin;
68
+ /**
69
+ * @example
70
+ * ```ts
71
+ * export default {
72
+ * plugins: [TanStackRouterEsbuild()],
73
+ * // ...
74
+ * }
75
+ * ```
76
+ */
77
+ declare const TanStackRouterEsbuild: (options?: Partial<{
78
+ routeFileIgnorePrefix: string;
79
+ routesDirectory: string;
80
+ generatedRouteTree: string;
81
+ quoteStyle: "single" | "double";
82
+ semicolons: boolean;
83
+ disableTypes: boolean;
84
+ addExtensions: boolean;
85
+ disableLogging: boolean;
86
+ disableManifestGeneration: boolean;
87
+ apiBase: string;
88
+ routeTreeFileHeader: string[];
89
+ routeTreeFileFooter: string[];
90
+ indexToken: string;
91
+ routeToken: string;
92
+ enableRouteGeneration?: boolean | undefined;
93
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
94
+ routeFilePrefix?: string | undefined;
95
+ routeFileIgnorePattern?: string | undefined;
96
+ autoCodeSplitting?: boolean | undefined;
97
+ experimental?: {
98
+ enableCodeSplitting?: boolean | undefined;
99
+ } | undefined;
100
+ }> | undefined) => import('unplugin').EsbuildPlugin;
101
+ export default TanStackRouterEsbuild;
102
+ export { configSchema, TanStackRouterGeneratorEsbuild, TanStackRouterCodeSplitterEsbuild, TanStackRouterEsbuild, };
103
+ export type { Config };
@@ -0,0 +1,103 @@
1
+ import { configSchema, Config } from './core/config.js';
2
+ /**
3
+ * @example
4
+ * ```ts
5
+ * export default {
6
+ * plugins: [TanStackRouterGeneratorEsbuild()],
7
+ * // ...
8
+ * }
9
+ * ```
10
+ */
11
+ declare const TanStackRouterGeneratorEsbuild: (options?: Partial<{
12
+ routeFileIgnorePrefix: string;
13
+ routesDirectory: string;
14
+ generatedRouteTree: string;
15
+ quoteStyle: "single" | "double";
16
+ semicolons: boolean;
17
+ disableTypes: boolean;
18
+ addExtensions: boolean;
19
+ disableLogging: boolean;
20
+ disableManifestGeneration: boolean;
21
+ apiBase: string;
22
+ routeTreeFileHeader: string[];
23
+ routeTreeFileFooter: string[];
24
+ indexToken: string;
25
+ routeToken: string;
26
+ enableRouteGeneration?: boolean | undefined;
27
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
28
+ routeFilePrefix?: string | undefined;
29
+ routeFileIgnorePattern?: string | undefined;
30
+ autoCodeSplitting?: boolean | undefined;
31
+ experimental?: {
32
+ enableCodeSplitting?: boolean | undefined;
33
+ } | undefined;
34
+ }> | undefined) => import('unplugin').EsbuildPlugin;
35
+ /**
36
+ * @example
37
+ * ```ts
38
+ * export default {
39
+ * plugins: [TanStackRouterCodeSplitterEsbuild()],
40
+ * // ...
41
+ * }
42
+ * ```
43
+ */
44
+ declare const TanStackRouterCodeSplitterEsbuild: (options?: Partial<{
45
+ routeFileIgnorePrefix: string;
46
+ routesDirectory: string;
47
+ generatedRouteTree: string;
48
+ quoteStyle: "single" | "double";
49
+ semicolons: boolean;
50
+ disableTypes: boolean;
51
+ addExtensions: boolean;
52
+ disableLogging: boolean;
53
+ disableManifestGeneration: boolean;
54
+ apiBase: string;
55
+ routeTreeFileHeader: string[];
56
+ routeTreeFileFooter: string[];
57
+ indexToken: string;
58
+ routeToken: string;
59
+ enableRouteGeneration?: boolean | undefined;
60
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
61
+ routeFilePrefix?: string | undefined;
62
+ routeFileIgnorePattern?: string | undefined;
63
+ autoCodeSplitting?: boolean | undefined;
64
+ experimental?: {
65
+ enableCodeSplitting?: boolean | undefined;
66
+ } | undefined;
67
+ }> | undefined) => import('unplugin').EsbuildPlugin;
68
+ /**
69
+ * @example
70
+ * ```ts
71
+ * export default {
72
+ * plugins: [TanStackRouterEsbuild()],
73
+ * // ...
74
+ * }
75
+ * ```
76
+ */
77
+ declare const TanStackRouterEsbuild: (options?: Partial<{
78
+ routeFileIgnorePrefix: string;
79
+ routesDirectory: string;
80
+ generatedRouteTree: string;
81
+ quoteStyle: "single" | "double";
82
+ semicolons: boolean;
83
+ disableTypes: boolean;
84
+ addExtensions: boolean;
85
+ disableLogging: boolean;
86
+ disableManifestGeneration: boolean;
87
+ apiBase: string;
88
+ routeTreeFileHeader: string[];
89
+ routeTreeFileFooter: string[];
90
+ indexToken: string;
91
+ routeToken: string;
92
+ enableRouteGeneration?: boolean | undefined;
93
+ virtualRouteConfig?: import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
94
+ routeFilePrefix?: string | undefined;
95
+ routeFileIgnorePattern?: string | undefined;
96
+ autoCodeSplitting?: boolean | undefined;
97
+ experimental?: {
98
+ enableCodeSplitting?: boolean | undefined;
99
+ } | undefined;
100
+ }> | undefined) => import('unplugin').EsbuildPlugin;
101
+ export default TanStackRouterEsbuild;
102
+ export { configSchema, TanStackRouterGeneratorEsbuild, TanStackRouterCodeSplitterEsbuild, TanStackRouterEsbuild, };
103
+ export type { Config };
@@ -0,0 +1,20 @@
1
+ import { createEsbuildPlugin } from "unplugin";
2
+ import { configSchema } from "./core/config.js";
3
+ import { unpluginRouterCodeSplitterFactory } from "./core/router-code-splitter-plugin.js";
4
+ import { unpluginRouterGeneratorFactory } from "./core/router-generator-plugin.js";
5
+ import { unpluginRouterComposedFactory } from "./core/router-composed-plugin.js";
6
+ const TanStackRouterGeneratorEsbuild = createEsbuildPlugin(
7
+ unpluginRouterGeneratorFactory
8
+ );
9
+ const TanStackRouterCodeSplitterEsbuild = createEsbuildPlugin(
10
+ unpluginRouterCodeSplitterFactory
11
+ );
12
+ const TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory);
13
+ export {
14
+ TanStackRouterCodeSplitterEsbuild,
15
+ TanStackRouterEsbuild,
16
+ TanStackRouterGeneratorEsbuild,
17
+ configSchema,
18
+ TanStackRouterEsbuild as default
19
+ };
20
+ //# sourceMappingURL=esbuild.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.js","sources":["../../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { configSchema } from './core/config'\nimport { unpluginRouterCodeSplitterFactory } from './core/router-code-splitter-plugin'\nimport { unpluginRouterGeneratorFactory } from './core/router-generator-plugin'\nimport { unpluginRouterComposedFactory } from './core/router-composed-plugin'\n\nimport type { Config } from './core/config'\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterGeneratorEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterGeneratorEsbuild = createEsbuildPlugin(\n unpluginRouterGeneratorFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterCodeSplitterEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterCodeSplitterEsbuild = createEsbuildPlugin(\n unpluginRouterCodeSplitterFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default {\n * plugins: [TanStackRouterEsbuild()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory)\n\nexport default TanStackRouterEsbuild\n\nexport {\n configSchema,\n TanStackRouterGeneratorEsbuild,\n TanStackRouterCodeSplitterEsbuild,\n TanStackRouterEsbuild,\n}\n\nexport type { Config }\n"],"names":[],"mappings":";;;;;AAkBA,MAAM,iCAAiC;AAAA,EACrC;AACF;AAWA,MAAM,oCAAoC;AAAA,EACxC;AACF;AAWM,MAAA,wBAAwB,oBAAoB,6BAA6B;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-plugin",
3
- "version": "1.73.1",
3
+ "version": "1.76.0",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -65,6 +65,16 @@
65
65
  "default": "./dist/cjs/webpack.cjs"
66
66
  }
67
67
  },
68
+ "./esbuild": {
69
+ "import": {
70
+ "types": "./dist/esm/esbuild.d.ts",
71
+ "default": "./dist/esm/esbuild.js"
72
+ },
73
+ "require": {
74
+ "types": "./dist/cjs/esbuild.d.cts",
75
+ "default": "./dist/cjs/esbuild.cjs"
76
+ }
77
+ },
68
78
  "./package.json": "./package.json"
69
79
  },
70
80
  "sideEffects": false,
@@ -92,7 +102,7 @@
92
102
  "chokidar": "^3.6.0",
93
103
  "unplugin": "^1.12.2",
94
104
  "zod": "^3.23.8",
95
- "@tanstack/router-generator": "^1.73.1",
105
+ "@tanstack/router-generator": "^1.74.2",
96
106
  "@tanstack/virtual-file-routes": "^1.64.0"
97
107
  },
98
108
  "peerDependencies": {
package/src/esbuild.ts ADDED
@@ -0,0 +1,56 @@
1
+ import { createEsbuildPlugin } from 'unplugin'
2
+
3
+ import { configSchema } from './core/config'
4
+ import { unpluginRouterCodeSplitterFactory } from './core/router-code-splitter-plugin'
5
+ import { unpluginRouterGeneratorFactory } from './core/router-generator-plugin'
6
+ import { unpluginRouterComposedFactory } from './core/router-composed-plugin'
7
+
8
+ import type { Config } from './core/config'
9
+
10
+ /**
11
+ * @example
12
+ * ```ts
13
+ * export default {
14
+ * plugins: [TanStackRouterGeneratorEsbuild()],
15
+ * // ...
16
+ * }
17
+ * ```
18
+ */
19
+ const TanStackRouterGeneratorEsbuild = createEsbuildPlugin(
20
+ unpluginRouterGeneratorFactory,
21
+ )
22
+
23
+ /**
24
+ * @example
25
+ * ```ts
26
+ * export default {
27
+ * plugins: [TanStackRouterCodeSplitterEsbuild()],
28
+ * // ...
29
+ * }
30
+ * ```
31
+ */
32
+ const TanStackRouterCodeSplitterEsbuild = createEsbuildPlugin(
33
+ unpluginRouterCodeSplitterFactory,
34
+ )
35
+
36
+ /**
37
+ * @example
38
+ * ```ts
39
+ * export default {
40
+ * plugins: [TanStackRouterEsbuild()],
41
+ * // ...
42
+ * }
43
+ * ```
44
+ */
45
+ const TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory)
46
+
47
+ export default TanStackRouterEsbuild
48
+
49
+ export {
50
+ configSchema,
51
+ TanStackRouterGeneratorEsbuild,
52
+ TanStackRouterCodeSplitterEsbuild,
53
+ TanStackRouterEsbuild,
54
+ }
55
+
56
+ export type { Config }