@tanstack/router-plugin 1.121.0-alpha.26 → 1.121.0-alpha.28
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/cjs/core/code-splitter/compilers.cjs +66 -40
- package/dist/cjs/core/code-splitter/compilers.cjs.map +1 -1
- package/dist/cjs/core/code-splitter/compilers.d.cts +3 -3
- package/dist/cjs/core/code-splitter/framework-options.cjs.map +1 -1
- package/dist/cjs/core/code-splitter/path-ids.cjs.map +1 -1
- package/dist/cjs/core/config.cjs +11 -1
- package/dist/cjs/core/config.cjs.map +1 -1
- package/dist/cjs/core/config.d.cts +49 -4
- package/dist/cjs/core/route-autoimport-plugin.cjs +52 -45
- package/dist/cjs/core/route-autoimport-plugin.cjs.map +1 -1
- package/dist/cjs/core/route-hmr-statement.cjs.map +1 -1
- package/dist/cjs/core/router-code-splitter-plugin.cjs +84 -64
- package/dist/cjs/core/router-code-splitter-plugin.cjs.map +1 -1
- package/dist/cjs/core/router-composed-plugin.cjs +12 -3
- package/dist/cjs/core/router-composed-plugin.cjs.map +1 -1
- package/dist/cjs/core/router-generator-plugin.cjs +27 -25
- package/dist/cjs/core/router-generator-plugin.cjs.map +1 -1
- package/dist/cjs/core/router-hmr-plugin.cjs +38 -29
- package/dist/cjs/core/router-hmr-plugin.cjs.map +1 -1
- package/dist/cjs/core/router-hmr-plugin.d.cts +1 -6
- package/dist/cjs/core/utils.cjs +0 -7
- package/dist/cjs/core/utils.cjs.map +1 -1
- package/dist/cjs/core/utils.d.cts +0 -1
- package/dist/cjs/esbuild.cjs.map +1 -1
- package/dist/cjs/esbuild.d.cts +20 -0
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/rspack.cjs.map +1 -1
- package/dist/cjs/rspack.d.cts +20 -0
- package/dist/cjs/vite.cjs.map +1 -1
- package/dist/cjs/vite.d.cts +25 -0
- package/dist/cjs/webpack.cjs.map +1 -1
- package/dist/cjs/webpack.d.cts +20 -0
- package/dist/esm/core/code-splitter/compilers.d.ts +3 -3
- package/dist/esm/core/code-splitter/compilers.js +66 -40
- package/dist/esm/core/code-splitter/compilers.js.map +1 -1
- package/dist/esm/core/code-splitter/framework-options.js.map +1 -1
- package/dist/esm/core/code-splitter/path-ids.js.map +1 -1
- package/dist/esm/core/config.d.ts +49 -4
- package/dist/esm/core/config.js +11 -1
- package/dist/esm/core/config.js.map +1 -1
- package/dist/esm/core/route-autoimport-plugin.js +53 -46
- package/dist/esm/core/route-autoimport-plugin.js.map +1 -1
- package/dist/esm/core/route-hmr-statement.js.map +1 -1
- package/dist/esm/core/router-code-splitter-plugin.js +86 -66
- package/dist/esm/core/router-code-splitter-plugin.js.map +1 -1
- package/dist/esm/core/router-composed-plugin.js +11 -2
- package/dist/esm/core/router-composed-plugin.js.map +1 -1
- package/dist/esm/core/router-generator-plugin.js +28 -26
- package/dist/esm/core/router-generator-plugin.js.map +1 -1
- package/dist/esm/core/router-hmr-plugin.d.ts +1 -6
- package/dist/esm/core/router-hmr-plugin.js +39 -30
- package/dist/esm/core/router-hmr-plugin.js.map +1 -1
- package/dist/esm/core/utils.d.ts +0 -1
- package/dist/esm/core/utils.js +1 -8
- package/dist/esm/core/utils.js.map +1 -1
- package/dist/esm/esbuild.d.ts +20 -0
- package/dist/esm/esbuild.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/rspack.d.ts +20 -0
- package/dist/esm/vite.d.ts +25 -0
- package/dist/esm/vite.js.map +1 -1
- package/dist/esm/webpack.d.ts +20 -0
- package/package.json +15 -15
- package/src/core/code-splitter/compilers.ts +95 -60
- package/src/core/config.ts +25 -0
- package/src/core/route-autoimport-plugin.ts +59 -53
- package/src/core/router-code-splitter-plugin.ts +95 -80
- package/src/core/router-composed-plugin.ts +12 -2
- package/src/core/router-generator-plugin.ts +32 -32
- package/src/core/router-hmr-plugin.ts +42 -37
- package/src/core/utils.ts +0 -15
- package/src/global.d.ts +7 -0
- package/src/index.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-generator-plugin.js","sources":["../../../src/core/router-generator-plugin.ts"],"sourcesContent":["import { isAbsolute, join, normalize } from 'node:path'\nimport { Generator, resolveConfigPath } from '@tanstack/router-generator'\
|
|
1
|
+
{"version":3,"file":"router-generator-plugin.js","sources":["../../../src/core/router-generator-plugin.ts"],"sourcesContent":["import { isAbsolute, join, normalize } from 'node:path'\nimport { Generator, resolveConfigPath } from '@tanstack/router-generator'\nimport { getConfig } from './config'\n\nimport type { GeneratorEvent } from '@tanstack/router-generator'\nimport type { FSWatcher } from 'chokidar'\nimport type { UnpluginFactory } from 'unplugin'\nimport type { Config } from './config'\n\nconst PLUGIN_NAME = 'unplugin:router-generator'\n\nexport const unpluginRouterGeneratorFactory: UnpluginFactory<\n Partial<Config> | undefined\n> = (options = {}) => {\n const ROOT: string = process.cwd()\n let userConfig = options as Config\n let generator: Generator\n\n const routeGenerationDisabled = () =>\n userConfig.enableRouteGeneration === false\n const getRoutesDirectoryPath = () => {\n return isAbsolute(userConfig.routesDirectory)\n ? userConfig.routesDirectory\n : join(ROOT, userConfig.routesDirectory)\n }\n\n const initConfigAndGenerator = () => {\n userConfig = getConfig(options, ROOT)\n generator = new Generator({\n config: userConfig,\n root: ROOT,\n })\n }\n\n const generate = async (opts?: {\n file: string\n event: 'create' | 'update' | 'delete'\n }) => {\n if (routeGenerationDisabled()) {\n return\n }\n let generatorEvent: GeneratorEvent | undefined = undefined\n if (opts) {\n const filePath = normalize(opts.file)\n if (filePath === resolveConfigPath({ configDirectory: ROOT })) {\n initConfigAndGenerator()\n return\n }\n generatorEvent = { path: filePath, type: opts.event }\n }\n\n try {\n await generator.run(generatorEvent)\n globalThis.TSR_ROUTES_BY_ID_MAP = generator.getRoutesByFileMap()\n } catch (e) {\n console.error(e)\n }\n }\n\n return {\n name: 'tanstack:router-generator',\n enforce: 'pre',\n async watchChange(id, { event }) {\n await generate({\n file: id,\n event,\n })\n },\n async buildStart() {\n await generate()\n },\n vite: {\n configResolved() {\n initConfigAndGenerator()\n },\n applyToEnvironment(environment) {\n if (userConfig.plugin?.vite?.environmentName) {\n return userConfig.plugin.vite.environmentName === environment.name\n }\n return true\n },\n async buildStart() {\n await generate()\n },\n sharedDuringBuild: true,\n },\n rspack(compiler) {\n initConfigAndGenerator()\n\n let handle: FSWatcher | null = null\n\n compiler.hooks.beforeRun.tapPromise(PLUGIN_NAME, () => generate())\n\n compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, async () => {\n if (handle) {\n return\n }\n\n // rspack watcher doesn't register newly created files\n const routesDirectoryPath = getRoutesDirectoryPath()\n const chokidar = await import('chokidar')\n handle = chokidar\n .watch(routesDirectoryPath, { ignoreInitial: true })\n .on('add', (file) => generate({ file, event: 'create' }))\n\n await generate()\n })\n\n compiler.hooks.watchClose.tap(PLUGIN_NAME, async () => {\n if (handle) {\n await handle.close()\n }\n })\n },\n webpack(compiler) {\n initConfigAndGenerator()\n\n let handle: FSWatcher | null = null\n\n compiler.hooks.beforeRun.tapPromise(PLUGIN_NAME, () => generate())\n\n compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, async () => {\n if (handle) {\n return\n }\n\n // webpack watcher doesn't register newly created files\n const routesDirectoryPath = getRoutesDirectoryPath()\n const chokidar = await import('chokidar')\n handle = chokidar\n .watch(routesDirectoryPath, { ignoreInitial: true })\n .on('add', (file) => generate({ file, event: 'create' }))\n\n await generate()\n })\n\n compiler.hooks.watchClose.tap(PLUGIN_NAME, async () => {\n if (handle) {\n await handle.close()\n }\n })\n\n compiler.hooks.done.tap(PLUGIN_NAME, () => {\n console.info('✅ ' + PLUGIN_NAME + ': route-tree generation done')\n })\n },\n }\n}\n"],"names":[],"mappings":";;;AASA,MAAM,cAAc;AAEb,MAAM,iCAET,CAAC,UAAU,OAAO;AACpB,QAAM,OAAe,QAAQ,IAAA;AAC7B,MAAI,aAAa;AACjB,MAAI;AAEJ,QAAM,0BAA0B,MAC9B,WAAW,0BAA0B;AACvC,QAAM,yBAAyB,MAAM;AACnC,WAAO,WAAW,WAAW,eAAe,IACxC,WAAW,kBACX,KAAK,MAAM,WAAW,eAAe;AAAA,EAC3C;AAEA,QAAM,yBAAyB,MAAM;AACnC,iBAAa,UAAU,SAAS,IAAI;AACpC,gBAAY,IAAI,UAAU;AAAA,MACxB,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA,CACP;AAAA,EACH;AAEA,QAAM,WAAW,OAAO,SAGlB;AACJ,QAAI,2BAA2B;AAC7B;AAAA,IACF;AACA,QAAI,iBAA6C;AACjD,QAAI,MAAM;AACR,YAAM,WAAW,UAAU,KAAK,IAAI;AACpC,UAAI,aAAa,kBAAkB,EAAE,iBAAiB,KAAA,CAAM,GAAG;AAC7D,+BAAA;AACA;AAAA,MACF;AACA,uBAAiB,EAAE,MAAM,UAAU,MAAM,KAAK,MAAA;AAAA,IAChD;AAEA,QAAI;AACF,YAAM,UAAU,IAAI,cAAc;AAClC,iBAAW,uBAAuB,UAAU,mBAAA;AAAA,IAC9C,SAAS,GAAG;AACV,cAAQ,MAAM,CAAC;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM,YAAY,IAAI,EAAE,SAAS;AAC/B,YAAM,SAAS;AAAA,QACb,MAAM;AAAA,QACN;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,MAAM,aAAa;AACjB,YAAM,SAAA;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,iBAAiB;AACf,+BAAA;AAAA,MACF;AAAA,MACA,mBAAmB,aAAa;AAC9B,YAAI,WAAW,QAAQ,MAAM,iBAAiB;AAC5C,iBAAO,WAAW,OAAO,KAAK,oBAAoB,YAAY;AAAA,QAChE;AACA,eAAO;AAAA,MACT;AAAA,MACA,MAAM,aAAa;AACjB,cAAM,SAAA;AAAA,MACR;AAAA,MACA,mBAAmB;AAAA,IAAA;AAAA,IAErB,OAAO,UAAU;AACf,6BAAA;AAEA,UAAI,SAA2B;AAE/B,eAAS,MAAM,UAAU,WAAW,aAAa,MAAM,UAAU;AAEjE,eAAS,MAAM,SAAS,WAAW,aAAa,YAAY;AAC1D,YAAI,QAAQ;AACV;AAAA,QACF;AAGA,cAAM,sBAAsB,uBAAA;AAC5B,cAAM,WAAW,MAAM,OAAO,UAAU;AACxC,iBAAS,SACN,MAAM,qBAAqB,EAAE,eAAe,KAAA,CAAM,EAClD,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,MAAM,OAAO,SAAA,CAAU,CAAC;AAE1D,cAAM,SAAA;AAAA,MACR,CAAC;AAED,eAAS,MAAM,WAAW,IAAI,aAAa,YAAY;AACrD,YAAI,QAAQ;AACV,gBAAM,OAAO,MAAA;AAAA,QACf;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA,QAAQ,UAAU;AAChB,6BAAA;AAEA,UAAI,SAA2B;AAE/B,eAAS,MAAM,UAAU,WAAW,aAAa,MAAM,UAAU;AAEjE,eAAS,MAAM,SAAS,WAAW,aAAa,YAAY;AAC1D,YAAI,QAAQ;AACV;AAAA,QACF;AAGA,cAAM,sBAAsB,uBAAA;AAC5B,cAAM,WAAW,MAAM,OAAO,UAAU;AACxC,iBAAS,SACN,MAAM,qBAAqB,EAAE,eAAe,KAAA,CAAM,EAClD,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,MAAM,OAAO,SAAA,CAAU,CAAC;AAE1D,cAAM,SAAA;AAAA,MACR,CAAC;AAED,eAAS,MAAM,WAAW,IAAI,aAAa,YAAY;AACrD,YAAI,QAAQ;AACV,gBAAM,OAAO,MAAA;AAAA,QACf;AAAA,MACF,CAAC;AAED,eAAS,MAAM,KAAK,IAAI,aAAa,MAAM;AACzC,gBAAQ,KAAK,OAAO,cAAc,8BAA8B;AAAA,MAClE,CAAC;AAAA,IACH;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { Config } from './config.js';
|
|
2
1
|
import { UnpluginFactory } from 'unplugin';
|
|
3
|
-
|
|
4
|
-
* This plugin adds HMR support for file routes.
|
|
5
|
-
* It is only added to the composed plugin in dev when autoCodeSplitting is disabled, since the code splitting plugin
|
|
6
|
-
* handles HMR for code-split routes itself.
|
|
7
|
-
*/
|
|
2
|
+
import { Config } from './config.js';
|
|
8
3
|
export declare const unpluginRouterHmrFactory: UnpluginFactory<Partial<Config> | undefined>;
|
|
@@ -1,47 +1,56 @@
|
|
|
1
1
|
import { parseAst, generateFromAst, logDiff } from "@tanstack/router-utils";
|
|
2
|
-
import { getConfig } from "./config.js";
|
|
3
2
|
import { routeHmrStatement } from "./route-hmr-statement.js";
|
|
4
|
-
import {
|
|
3
|
+
import { debug } from "./utils.js";
|
|
4
|
+
import { getConfig } from "./config.js";
|
|
5
|
+
const includeCode = [
|
|
6
|
+
"createFileRoute(",
|
|
7
|
+
"createRootRoute(",
|
|
8
|
+
"createRootRouteWithContext("
|
|
9
|
+
];
|
|
5
10
|
const unpluginRouterHmrFactory = (options = {}) => {
|
|
6
11
|
let ROOT = process.cwd();
|
|
7
12
|
let userConfig = options;
|
|
8
13
|
return {
|
|
9
|
-
name: "router
|
|
14
|
+
name: "tanstack-router:hmr",
|
|
10
15
|
enforce: "pre",
|
|
11
|
-
transform
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
transform: {
|
|
17
|
+
filter: {
|
|
18
|
+
// this is necessary for webpack / rspack to avoid matching .html files
|
|
19
|
+
id: /\.(m|c)?(j|t)sx?$/,
|
|
20
|
+
code: {
|
|
21
|
+
include: includeCode
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
handler(code, id) {
|
|
25
|
+
if (!globalThis.TSR_ROUTES_BY_ID_MAP?.has(id)) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
if (debug) console.info("Adding HMR handling to route ", id);
|
|
29
|
+
const ast = parseAst({ code });
|
|
30
|
+
ast.program.body.push(routeHmrStatement);
|
|
31
|
+
const result = generateFromAst(ast, {
|
|
32
|
+
sourceMaps: true,
|
|
33
|
+
filename: id,
|
|
34
|
+
sourceFileName: id
|
|
35
|
+
});
|
|
36
|
+
if (debug) {
|
|
37
|
+
logDiff(code, result.code);
|
|
38
|
+
console.log("Output:\n", result.code + "\n\n");
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
26
41
|
}
|
|
27
|
-
return result;
|
|
28
|
-
},
|
|
29
|
-
transformInclude(id) {
|
|
30
|
-
return fileIsInRoutesDirectory(id, userConfig.routesDirectory);
|
|
31
42
|
},
|
|
32
43
|
vite: {
|
|
33
44
|
configResolved(config) {
|
|
34
45
|
ROOT = config.root;
|
|
35
46
|
userConfig = getConfig(options, ROOT);
|
|
47
|
+
},
|
|
48
|
+
applyToEnvironment(environment) {
|
|
49
|
+
if (userConfig.plugin?.vite?.environmentName) {
|
|
50
|
+
return userConfig.plugin.vite.environmentName === environment.name;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
36
53
|
}
|
|
37
|
-
},
|
|
38
|
-
rspack() {
|
|
39
|
-
ROOT = process.cwd();
|
|
40
|
-
userConfig = getConfig(options, ROOT);
|
|
41
|
-
},
|
|
42
|
-
webpack() {
|
|
43
|
-
ROOT = process.cwd();
|
|
44
|
-
userConfig = getConfig(options, ROOT);
|
|
45
54
|
}
|
|
46
55
|
};
|
|
47
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-hmr-plugin.js","sources":["../../../src/core/router-hmr-plugin.ts"],"sourcesContent":["import { generateFromAst, logDiff, parseAst } from '@tanstack/router-utils'\nimport {
|
|
1
|
+
{"version":3,"file":"router-hmr-plugin.js","sources":["../../../src/core/router-hmr-plugin.ts"],"sourcesContent":["import { generateFromAst, logDiff, parseAst } from '@tanstack/router-utils'\nimport { routeHmrStatement } from './route-hmr-statement'\nimport { debug } from './utils'\nimport { getConfig } from './config'\nimport type { UnpluginFactory } from 'unplugin'\nimport type { Config } from './config'\n\n/**\n * This plugin adds HMR support for file routes.\n * It is only added to the composed plugin in dev when autoCodeSplitting is disabled, since the code splitting plugin\n * handles HMR for code-split routes itself.\n */\n\nconst includeCode = [\n 'createFileRoute(',\n 'createRootRoute(',\n 'createRootRouteWithContext(',\n]\nexport const unpluginRouterHmrFactory: UnpluginFactory<\n Partial<Config> | undefined\n> = (options = {}) => {\n let ROOT: string = process.cwd()\n let userConfig = options as Config\n\n return {\n name: 'tanstack-router:hmr',\n enforce: 'pre',\n transform: {\n filter: {\n // this is necessary for webpack / rspack to avoid matching .html files\n id: /\\.(m|c)?(j|t)sx?$/,\n code: {\n include: includeCode,\n },\n },\n handler(code, id) {\n if (!globalThis.TSR_ROUTES_BY_ID_MAP?.has(id)) {\n return null\n }\n\n if (debug) console.info('Adding HMR handling to route ', id)\n\n const ast = parseAst({ code })\n ast.program.body.push(routeHmrStatement)\n const result = generateFromAst(ast, {\n sourceMaps: true,\n filename: id,\n sourceFileName: id,\n })\n if (debug) {\n logDiff(code, result.code)\n console.log('Output:\\n', result.code + '\\n\\n')\n }\n return result\n },\n },\n vite: {\n configResolved(config) {\n ROOT = config.root\n userConfig = getConfig(options, ROOT)\n },\n applyToEnvironment(environment) {\n if (userConfig.plugin?.vite?.environmentName) {\n return userConfig.plugin.vite.environmentName === environment.name\n }\n return true\n },\n },\n }\n}\n"],"names":[],"mappings":";;;;AAaA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,2BAET,CAAC,UAAU,OAAO;AACpB,MAAI,OAAe,QAAQ,IAAA;AAC3B,MAAI,aAAa;AAEjB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,MACT,QAAQ;AAAA;AAAA,QAEN,IAAI;AAAA,QACJ,MAAM;AAAA,UACJ,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MAEF,QAAQ,MAAM,IAAI;AAChB,YAAI,CAAC,WAAW,sBAAsB,IAAI,EAAE,GAAG;AAC7C,iBAAO;AAAA,QACT;AAEA,YAAI,MAAO,SAAQ,KAAK,iCAAiC,EAAE;AAE3D,cAAM,MAAM,SAAS,EAAE,MAAM;AAC7B,YAAI,QAAQ,KAAK,KAAK,iBAAiB;AACvC,cAAM,SAAS,gBAAgB,KAAK;AAAA,UAClC,YAAY;AAAA,UACZ,UAAU;AAAA,UACV,gBAAgB;AAAA,QAAA,CACjB;AACD,YAAI,OAAO;AACT,kBAAQ,MAAM,OAAO,IAAI;AACzB,kBAAQ,IAAI,aAAa,OAAO,OAAO,MAAM;AAAA,QAC/C;AACA,eAAO;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,MAAM;AAAA,MACJ,eAAe,QAAQ;AACrB,eAAO,OAAO;AACd,qBAAa,UAAU,SAAS,IAAI;AAAA,MACtC;AAAA,MACA,mBAAmB,aAAa;AAC9B,YAAI,WAAW,QAAQ,MAAM,iBAAiB;AAC5C,iBAAO,WAAW,OAAO,KAAK,oBAAoB,YAAY;AAAA,QAChE;AACA,eAAO;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
package/dist/esm/core/utils.d.ts
CHANGED
package/dist/esm/core/utils.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { isAbsolute, join, normalize } from "node:path";
|
|
2
1
|
const debug = process.env.TSR_VITE_DEBUG && ["true", "router-plugin"].includes(process.env.TSR_VITE_DEBUG);
|
|
3
|
-
function fileIsInRoutesDirectory(filePath, routesDirectory) {
|
|
4
|
-
const routesDirectoryPath = isAbsolute(routesDirectory) ? routesDirectory : join(process.cwd(), routesDirectory);
|
|
5
|
-
const path = normalize(filePath);
|
|
6
|
-
return path.startsWith(routesDirectoryPath);
|
|
7
|
-
}
|
|
8
2
|
export {
|
|
9
|
-
debug
|
|
10
|
-
fileIsInRoutesDirectory
|
|
3
|
+
debug
|
|
11
4
|
};
|
|
12
5
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":["export const debug =\n process.env.TSR_VITE_DEBUG &&\n ['true', 'router-plugin'].includes(process.env.TSR_VITE_DEBUG)\n"],"names":[],"mappings":"AAAO,MAAM,QACX,QAAQ,IAAI,kBACZ,CAAC,QAAQ,eAAe,EAAE,SAAS,QAAQ,IAAI,cAAc;"}
|
package/dist/esm/esbuild.d.ts
CHANGED
|
@@ -26,6 +26,11 @@ declare const TanStackRouterGeneratorEsbuild: (options?: Partial<{
|
|
|
26
26
|
tmpDir: string;
|
|
27
27
|
enableRouteGeneration?: boolean | undefined;
|
|
28
28
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
29
|
+
plugin?: {
|
|
30
|
+
vite?: {
|
|
31
|
+
environmentName?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
} | undefined;
|
|
29
34
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
30
35
|
routeFilePrefix?: string | undefined;
|
|
31
36
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -68,6 +73,11 @@ declare const TanStackRouterCodeSplitterEsbuild: (options?: Partial<{
|
|
|
68
73
|
tmpDir: string;
|
|
69
74
|
enableRouteGeneration?: boolean | undefined;
|
|
70
75
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
76
|
+
plugin?: {
|
|
77
|
+
vite?: {
|
|
78
|
+
environmentName?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | undefined;
|
|
71
81
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
72
82
|
routeFilePrefix?: string | undefined;
|
|
73
83
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -110,6 +120,11 @@ declare const TanStackRouterEsbuild: (options?: Partial<{
|
|
|
110
120
|
tmpDir: string;
|
|
111
121
|
enableRouteGeneration?: boolean | undefined;
|
|
112
122
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
123
|
+
plugin?: {
|
|
124
|
+
vite?: {
|
|
125
|
+
environmentName?: string | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
} | undefined;
|
|
113
128
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
114
129
|
routeFilePrefix?: string | undefined;
|
|
115
130
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -143,6 +158,11 @@ declare const tanstackRouter: (options?: Partial<{
|
|
|
143
158
|
tmpDir: string;
|
|
144
159
|
enableRouteGeneration?: boolean | undefined;
|
|
145
160
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
161
|
+
plugin?: {
|
|
162
|
+
vite?: {
|
|
163
|
+
environmentName?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
} | undefined;
|
|
146
166
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
147
167
|
routeFilePrefix?: string | undefined;
|
|
148
168
|
routeFileIgnorePattern?: string | undefined;
|
package/dist/esm/esbuild.js.map
CHANGED
|
@@ -1 +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: [tanstackRouter()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory)\nconst tanstackRouter = TanStackRouterEsbuild\nexport default TanStackRouterEsbuild\n\nexport {\n configSchema,\n TanStackRouterGeneratorEsbuild,\n TanStackRouterCodeSplitterEsbuild,\n TanStackRouterEsbuild,\n tanstackRouter,\n}\n\nexport type { Config }\n"],"names":[],"mappings":";;;;;AAkBA,MAAM,iCAAiC;AAAA,EACrC;AACF;AAWA,MAAM,oCAAoC;AAAA,EACxC;AACF;
|
|
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: [tanstackRouter()],\n * // ...\n * }\n * ```\n */\nconst TanStackRouterEsbuild = createEsbuildPlugin(unpluginRouterComposedFactory)\nconst tanstackRouter = TanStackRouterEsbuild\nexport default TanStackRouterEsbuild\n\nexport {\n configSchema,\n TanStackRouterGeneratorEsbuild,\n TanStackRouterCodeSplitterEsbuild,\n TanStackRouterEsbuild,\n tanstackRouter,\n}\n\nexport type { Config }\n"],"names":[],"mappings":";;;;;AAkBA,MAAM,iCAAiC;AAAA,EACrC;AACF;AAWA,MAAM,oCAAoC;AAAA,EACxC;AACF;AAWA,MAAM,wBAAwB,oBAAoB,6BAA6B;AAC/E,MAAM,iBAAiB;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { configSchema, getConfig } from './core/config.js';
|
|
|
2
2
|
export { unpluginRouterCodeSplitterFactory } from './core/router-code-splitter-plugin.js';
|
|
3
3
|
export { unpluginRouterGeneratorFactory } from './core/router-generator-plugin.js';
|
|
4
4
|
export type { Config, ConfigInput, ConfigOutput } from './core/config.js';
|
|
5
|
+
export { tsrSplit, splitRouteIdentNodes, defaultCodeSplitGroupings, } from './core/constants.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { configSchema, getConfig } from "./core/config.js";
|
|
2
2
|
import { unpluginRouterCodeSplitterFactory } from "./core/router-code-splitter-plugin.js";
|
|
3
3
|
import { unpluginRouterGeneratorFactory } from "./core/router-generator-plugin.js";
|
|
4
|
+
import { defaultCodeSplitGroupings, splitRouteIdentNodes, tsrSplit } from "./core/constants.js";
|
|
4
5
|
export {
|
|
5
6
|
configSchema,
|
|
7
|
+
defaultCodeSplitGroupings,
|
|
6
8
|
getConfig,
|
|
9
|
+
splitRouteIdentNodes,
|
|
10
|
+
tsrSplit,
|
|
7
11
|
unpluginRouterCodeSplitterFactory,
|
|
8
12
|
unpluginRouterGeneratorFactory
|
|
9
13
|
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/esm/rspack.d.ts
CHANGED
|
@@ -30,6 +30,11 @@ declare const TanStackRouterGeneratorRspack: (options?: Partial<{
|
|
|
30
30
|
tmpDir: string;
|
|
31
31
|
enableRouteGeneration?: boolean | undefined;
|
|
32
32
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
33
|
+
plugin?: {
|
|
34
|
+
vite?: {
|
|
35
|
+
environmentName?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
} | undefined;
|
|
33
38
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
34
39
|
routeFilePrefix?: string | undefined;
|
|
35
40
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -76,6 +81,11 @@ declare const TanStackRouterCodeSplitterRspack: (options?: Partial<{
|
|
|
76
81
|
tmpDir: string;
|
|
77
82
|
enableRouteGeneration?: boolean | undefined;
|
|
78
83
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
84
|
+
plugin?: {
|
|
85
|
+
vite?: {
|
|
86
|
+
environmentName?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
} | undefined;
|
|
79
89
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
80
90
|
routeFilePrefix?: string | undefined;
|
|
81
91
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -122,6 +132,11 @@ declare const TanStackRouterRspack: (options?: Partial<{
|
|
|
122
132
|
tmpDir: string;
|
|
123
133
|
enableRouteGeneration?: boolean | undefined;
|
|
124
134
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
135
|
+
plugin?: {
|
|
136
|
+
vite?: {
|
|
137
|
+
environmentName?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
} | undefined;
|
|
125
140
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
126
141
|
routeFilePrefix?: string | undefined;
|
|
127
142
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -155,6 +170,11 @@ declare const tanstackRouter: (options?: Partial<{
|
|
|
155
170
|
tmpDir: string;
|
|
156
171
|
enableRouteGeneration?: boolean | undefined;
|
|
157
172
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
173
|
+
plugin?: {
|
|
174
|
+
vite?: {
|
|
175
|
+
environmentName?: string | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
} | undefined;
|
|
158
178
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
159
179
|
routeFilePrefix?: string | undefined;
|
|
160
180
|
routeFileIgnorePattern?: string | undefined;
|
package/dist/esm/vite.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ declare const tanstackRouterAutoImport: (options?: Partial<{
|
|
|
17
17
|
tmpDir: string;
|
|
18
18
|
enableRouteGeneration?: boolean | undefined;
|
|
19
19
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
20
|
+
plugin?: {
|
|
21
|
+
vite?: {
|
|
22
|
+
environmentName?: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
} | undefined;
|
|
20
25
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
21
26
|
routeFilePrefix?: string | undefined;
|
|
22
27
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -59,6 +64,11 @@ declare const tanstackRouterGenerator: (options?: Partial<{
|
|
|
59
64
|
tmpDir: string;
|
|
60
65
|
enableRouteGeneration?: boolean | undefined;
|
|
61
66
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
67
|
+
plugin?: {
|
|
68
|
+
vite?: {
|
|
69
|
+
environmentName?: string | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
} | undefined;
|
|
62
72
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
63
73
|
routeFilePrefix?: string | undefined;
|
|
64
74
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -101,6 +111,11 @@ declare const tanStackRouterCodeSplitter: (options?: Partial<{
|
|
|
101
111
|
tmpDir: string;
|
|
102
112
|
enableRouteGeneration?: boolean | undefined;
|
|
103
113
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
114
|
+
plugin?: {
|
|
115
|
+
vite?: {
|
|
116
|
+
environmentName?: string | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
} | undefined;
|
|
104
119
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
105
120
|
routeFilePrefix?: string | undefined;
|
|
106
121
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -143,6 +158,11 @@ declare const tanstackRouter: (options?: Partial<{
|
|
|
143
158
|
tmpDir: string;
|
|
144
159
|
enableRouteGeneration?: boolean | undefined;
|
|
145
160
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
161
|
+
plugin?: {
|
|
162
|
+
vite?: {
|
|
163
|
+
environmentName?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
} | undefined;
|
|
146
166
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
147
167
|
routeFilePrefix?: string | undefined;
|
|
148
168
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -179,6 +199,11 @@ declare const TanStackRouterVite: (options?: Partial<{
|
|
|
179
199
|
tmpDir: string;
|
|
180
200
|
enableRouteGeneration?: boolean | undefined;
|
|
181
201
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
202
|
+
plugin?: {
|
|
203
|
+
vite?: {
|
|
204
|
+
environmentName?: string | undefined;
|
|
205
|
+
} | undefined;
|
|
206
|
+
} | undefined;
|
|
182
207
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
183
208
|
routeFilePrefix?: string | undefined;
|
|
184
209
|
routeFileIgnorePattern?: string | undefined;
|
package/dist/esm/vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.js","sources":["../../src/vite.ts"],"sourcesContent":["import { createVitePlugin } 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'\nimport { unpluginRouteAutoImportFactory } from './core/route-autoimport-plugin'\nimport type { Config } from './core/config'\n\nconst tanstackRouterAutoImport = createVitePlugin(\n unpluginRouteAutoImportFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanstackRouterGenerator()],\n * // ...\n * })\n * ```\n */\nconst tanstackRouterGenerator = createVitePlugin(unpluginRouterGeneratorFactory)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanStackRouterCodeSplitter()],\n * // ...\n * })\n * ```\n */\nconst tanStackRouterCodeSplitter = createVitePlugin(\n unpluginRouterCodeSplitterFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanstackRouter()],\n * // ...\n * })\n * ```\n */\nconst tanstackRouter = createVitePlugin(unpluginRouterComposedFactory)\n\n/**\n * @deprecated Use `tanstackRouter` instead.\n */\nconst TanStackRouterVite = tanstackRouter\n\nexport default tanstackRouter\nexport {\n configSchema,\n tanstackRouterAutoImport,\n tanStackRouterCodeSplitter,\n tanstackRouterGenerator,\n TanStackRouterVite,\n tanstackRouter,\n}\n\nexport type { Config }\n"],"names":[],"mappings":";;;;;;AASA,MAAM,2BAA2B;AAAA,EAC/B;AACF;
|
|
1
|
+
{"version":3,"file":"vite.js","sources":["../../src/vite.ts"],"sourcesContent":["import { createVitePlugin } 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'\nimport { unpluginRouteAutoImportFactory } from './core/route-autoimport-plugin'\nimport type { Config } from './core/config'\n\nconst tanstackRouterAutoImport = createVitePlugin(\n unpluginRouteAutoImportFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanstackRouterGenerator()],\n * // ...\n * })\n * ```\n */\nconst tanstackRouterGenerator = createVitePlugin(unpluginRouterGeneratorFactory)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanStackRouterCodeSplitter()],\n * // ...\n * })\n * ```\n */\nconst tanStackRouterCodeSplitter = createVitePlugin(\n unpluginRouterCodeSplitterFactory,\n)\n\n/**\n * @example\n * ```ts\n * export default defineConfig({\n * plugins: [tanstackRouter()],\n * // ...\n * })\n * ```\n */\nconst tanstackRouter = createVitePlugin(unpluginRouterComposedFactory)\n\n/**\n * @deprecated Use `tanstackRouter` instead.\n */\nconst TanStackRouterVite = tanstackRouter\n\nexport default tanstackRouter\nexport {\n configSchema,\n tanstackRouterAutoImport,\n tanStackRouterCodeSplitter,\n tanstackRouterGenerator,\n TanStackRouterVite,\n tanstackRouter,\n}\n\nexport type { Config }\n"],"names":[],"mappings":";;;;;;AASA,MAAM,2BAA2B;AAAA,EAC/B;AACF;AAWA,MAAM,0BAA0B,iBAAiB,8BAA8B;AAW/E,MAAM,6BAA6B;AAAA,EACjC;AACF;AAWA,MAAM,iBAAiB,iBAAiB,6BAA6B;AAKrE,MAAM,qBAAqB;"}
|
package/dist/esm/webpack.d.ts
CHANGED
|
@@ -26,6 +26,11 @@ declare const TanStackRouterGeneratorWebpack: (options?: Partial<{
|
|
|
26
26
|
tmpDir: string;
|
|
27
27
|
enableRouteGeneration?: boolean | undefined;
|
|
28
28
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
29
|
+
plugin?: {
|
|
30
|
+
vite?: {
|
|
31
|
+
environmentName?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
} | undefined;
|
|
29
34
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
30
35
|
routeFilePrefix?: string | undefined;
|
|
31
36
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -68,6 +73,11 @@ declare const TanStackRouterCodeSplitterWebpack: (options?: Partial<{
|
|
|
68
73
|
tmpDir: string;
|
|
69
74
|
enableRouteGeneration?: boolean | undefined;
|
|
70
75
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
76
|
+
plugin?: {
|
|
77
|
+
vite?: {
|
|
78
|
+
environmentName?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | undefined;
|
|
71
81
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
72
82
|
routeFilePrefix?: string | undefined;
|
|
73
83
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -110,6 +120,11 @@ declare const TanStackRouterWebpack: (options?: Partial<{
|
|
|
110
120
|
tmpDir: string;
|
|
111
121
|
enableRouteGeneration?: boolean | undefined;
|
|
112
122
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
123
|
+
plugin?: {
|
|
124
|
+
vite?: {
|
|
125
|
+
environmentName?: string | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
} | undefined;
|
|
113
128
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
114
129
|
routeFilePrefix?: string | undefined;
|
|
115
130
|
routeFileIgnorePattern?: string | undefined;
|
|
@@ -143,6 +158,11 @@ declare const tanstackRouter: (options?: Partial<{
|
|
|
143
158
|
tmpDir: string;
|
|
144
159
|
enableRouteGeneration?: boolean | undefined;
|
|
145
160
|
codeSplittingOptions?: import('./core/config.js').CodeSplittingOptions | undefined;
|
|
161
|
+
plugin?: {
|
|
162
|
+
vite?: {
|
|
163
|
+
environmentName?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
} | undefined;
|
|
146
166
|
virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
|
|
147
167
|
routeFilePrefix?: string | undefined;
|
|
148
168
|
routeFileIgnorePattern?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/router-plugin",
|
|
3
|
-
"version": "1.121.0-alpha.
|
|
3
|
+
"version": "1.121.0-alpha.28",
|
|
4
4
|
"description": "Modern and scalable routing for React applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -87,32 +87,32 @@
|
|
|
87
87
|
"node": ">=12"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@babel/core": "^7.
|
|
91
|
-
"@babel/plugin-syntax-jsx": "^7.
|
|
92
|
-
"@babel/plugin-syntax-typescript": "^7.
|
|
93
|
-
"@babel/template": "^7.
|
|
94
|
-
"@babel/traverse": "^7.
|
|
95
|
-
"@babel/types": "^7.
|
|
90
|
+
"@babel/core": "^7.27.7",
|
|
91
|
+
"@babel/plugin-syntax-jsx": "^7.27.1",
|
|
92
|
+
"@babel/plugin-syntax-typescript": "^7.27.1",
|
|
93
|
+
"@babel/template": "^7.27.2",
|
|
94
|
+
"@babel/traverse": "^7.27.7",
|
|
95
|
+
"@babel/types": "^7.27.7",
|
|
96
96
|
"babel-dead-code-elimination": "^1.0.10",
|
|
97
97
|
"chokidar": "^3.6.0",
|
|
98
98
|
"unplugin": "^2.1.2",
|
|
99
99
|
"zod": "^3.24.2",
|
|
100
|
-
"@tanstack/router-
|
|
101
|
-
"@tanstack/router-
|
|
102
|
-
"@tanstack/router-
|
|
103
|
-
"@tanstack/virtual-file-routes": "
|
|
100
|
+
"@tanstack/router-core": "1.121.0-alpha.28",
|
|
101
|
+
"@tanstack/router-generator": "1.121.0-alpha.28",
|
|
102
|
+
"@tanstack/router-utils": "1.121.0-alpha.28",
|
|
103
|
+
"@tanstack/virtual-file-routes": "1.121.0-alpha.28"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@types/babel__core": "^7.20.5",
|
|
107
107
|
"@types/babel__template": "^7.4.4",
|
|
108
|
-
"@types/babel__traverse": "^7.20.
|
|
108
|
+
"@types/babel__traverse": "^7.20.7"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
111
|
"@rsbuild/core": ">=1.0.2",
|
|
112
|
-
"vite": ">=5.0.0 || >=6.0.0",
|
|
113
|
-
"vite-plugin-solid": "^2.11.
|
|
112
|
+
"vite": ">=5.0.0 || >=6.0.0 || >=7.0.0",
|
|
113
|
+
"vite-plugin-solid": "^2.11.8",
|
|
114
114
|
"webpack": ">=5.92.0",
|
|
115
|
-
"@tanstack/react-router": "^1.121.0-alpha.
|
|
115
|
+
"@tanstack/react-router": "^1.121.0-alpha.28"
|
|
116
116
|
},
|
|
117
117
|
"peerDependenciesMeta": {
|
|
118
118
|
"@rsbuild/core": {
|