@tanstack/vue-start 1.167.19 → 1.167.21

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,5 @@
1
+ export declare const vueStartDefaultEntryPaths: {
2
+ client: string;
3
+ server: string;
4
+ start: string;
5
+ };
@@ -0,0 +1,14 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import path from "pathe";
3
+ //#region src/plugin/shared.ts
4
+ var currentDir = path.dirname(fileURLToPath(import.meta.url));
5
+ var defaultEntryDir = path.resolve(currentDir, "..", "..", "plugin", "default-entry");
6
+ var vueStartDefaultEntryPaths = {
7
+ client: path.resolve(defaultEntryDir, "client.tsx"),
8
+ server: path.resolve(defaultEntryDir, "server.ts"),
9
+ start: path.resolve(defaultEntryDir, "start.ts")
10
+ };
11
+ //#endregion
12
+ export { vueStartDefaultEntryPaths };
13
+
14
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","names":[],"sources":["../../../src/plugin/shared.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url'\nimport path from 'pathe'\n\nconst currentDir = path.dirname(fileURLToPath(import.meta.url))\nconst defaultEntryDir = path.resolve(\n currentDir,\n '..',\n '..',\n 'plugin',\n 'default-entry',\n)\n\nexport const vueStartDefaultEntryPaths = {\n client: path.resolve(defaultEntryDir, 'client.tsx'),\n server: path.resolve(defaultEntryDir, 'server.ts'),\n start: path.resolve(defaultEntryDir, 'start.ts'),\n}\n"],"mappings":";;;AAGA,IAAM,aAAa,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAC/D,IAAM,kBAAkB,KAAK,QAC3B,YACA,MACA,MACA,UACA,gBACD;AAED,IAAa,4BAA4B;CACvC,QAAQ,KAAK,QAAQ,iBAAiB,aAAa;CACnD,QAAQ,KAAK,QAAQ,iBAAiB,YAAY;CAClD,OAAO,KAAK,QAAQ,iBAAiB,WAAW;CACjD"}
@@ -1,3 +1,3 @@
1
- import { TanStackStartInputConfig } from '@tanstack/start-plugin-core';
1
+ import { TanStackStartViteInputConfig } from '@tanstack/start-plugin-core';
2
2
  import { PluginOption } from 'vite';
3
- export declare function tanstackStart(options?: TanStackStartInputConfig): Array<PluginOption>;
3
+ export declare function tanstackStart(options?: TanStackStartViteInputConfig): Array<PluginOption>;
@@ -1,27 +1,22 @@
1
- import { fileURLToPath } from "node:url";
2
- import { TanStackStartVitePluginCore, VITE_ENVIRONMENT_NAMES } from "@tanstack/start-plugin-core";
3
- import path from "pathe";
1
+ import { vueStartDefaultEntryPaths } from "./shared.js";
2
+ import { START_ENVIRONMENT_NAMES, tanStackStartVite } from "@tanstack/start-plugin-core";
4
3
  //#region src/plugin/vite.ts
5
- var currentDir = path.dirname(fileURLToPath(import.meta.url));
6
- var defaultEntryDir = path.resolve(currentDir, "..", "..", "plugin", "default-entry");
7
- var defaultEntryPaths = {
8
- client: path.resolve(defaultEntryDir, "client.tsx"),
9
- server: path.resolve(defaultEntryDir, "server.ts"),
10
- start: path.resolve(defaultEntryDir, "start.ts")
11
- };
12
4
  function tanstackStart(options) {
13
5
  return [{
14
6
  name: "tanstack-vue-start:config",
15
7
  configEnvironment(environmentName, options) {
16
- return { optimizeDeps: environmentName === VITE_ENVIRONMENT_NAMES.client || environmentName === VITE_ENVIRONMENT_NAMES.server && options.optimizeDeps?.noDiscovery === false ? { exclude: [
8
+ return { optimizeDeps: environmentName === START_ENVIRONMENT_NAMES.client || environmentName === START_ENVIRONMENT_NAMES.server && options.optimizeDeps?.noDiscovery === false ? { exclude: [
17
9
  "@tanstack/vue-start",
18
10
  "@tanstack/vue-router",
19
11
  "@tanstack/start-static-server-functions"
20
12
  ] } : void 0 };
21
13
  }
22
- }, TanStackStartVitePluginCore({
14
+ }, tanStackStartVite({
23
15
  framework: "vue",
24
- defaultEntryPaths
16
+ defaultEntryPaths: vueStartDefaultEntryPaths,
17
+ providerEnvironmentName: START_ENVIRONMENT_NAMES.server,
18
+ ssrIsProvider: true,
19
+ ssrResolverStrategy: { type: "default" }
25
20
  }, options)];
26
21
  }
27
22
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"vite.js","names":[],"sources":["../../../src/plugin/vite.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url'\nimport {\n TanStackStartVitePluginCore,\n VITE_ENVIRONMENT_NAMES,\n} from '@tanstack/start-plugin-core'\nimport path from 'pathe'\nimport type { TanStackStartInputConfig } from '@tanstack/start-plugin-core'\nimport type { PluginOption } from 'vite'\n\nconst currentDir = path.dirname(fileURLToPath(import.meta.url))\nconst defaultEntryDir = path.resolve(\n currentDir,\n '..',\n '..',\n 'plugin',\n 'default-entry',\n)\nconst defaultEntryPaths = {\n client: path.resolve(defaultEntryDir, 'client.tsx'),\n server: path.resolve(defaultEntryDir, 'server.ts'),\n start: path.resolve(defaultEntryDir, 'start.ts'),\n}\n\nexport function tanstackStart(\n options?: TanStackStartInputConfig,\n): Array<PluginOption> {\n return [\n {\n name: 'tanstack-vue-start:config',\n configEnvironment(environmentName, options) {\n return {\n optimizeDeps:\n environmentName === VITE_ENVIRONMENT_NAMES.client ||\n (environmentName === VITE_ENVIRONMENT_NAMES.server &&\n // This indicates that the server environment has opted in to dependency optimization\n options.optimizeDeps?.noDiscovery === false)\n ? {\n // As `@tanstack/vue-start` depends on `@tanstack/vue-router`, we should exclude both.\n exclude: [\n '@tanstack/vue-start',\n '@tanstack/vue-router',\n '@tanstack/start-static-server-functions',\n ],\n }\n : undefined,\n }\n },\n },\n TanStackStartVitePluginCore(\n {\n framework: 'vue',\n defaultEntryPaths,\n },\n options,\n ),\n ]\n}\n"],"mappings":";;;;AASA,IAAM,aAAa,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAC/D,IAAM,kBAAkB,KAAK,QAC3B,YACA,MACA,MACA,UACA,gBACD;AACD,IAAM,oBAAoB;CACxB,QAAQ,KAAK,QAAQ,iBAAiB,aAAa;CACnD,QAAQ,KAAK,QAAQ,iBAAiB,YAAY;CAClD,OAAO,KAAK,QAAQ,iBAAiB,WAAW;CACjD;AAED,SAAgB,cACd,SACqB;AACrB,QAAO,CACL;EACE,MAAM;EACN,kBAAkB,iBAAiB,SAAS;AAC1C,UAAO,EACL,cACE,oBAAoB,uBAAuB,UAC1C,oBAAoB,uBAAuB,UAE1C,QAAQ,cAAc,gBAAgB,QACpC,EAEE,SAAS;IACP;IACA;IACA;IACD,EACF,GACD,KAAA,GACP;;EAEJ,EACD,4BACE;EACE,WAAW;EACX;EACD,EACD,QACD,CACF"}
1
+ {"version":3,"file":"vite.js","names":[],"sources":["../../../src/plugin/vite.ts"],"sourcesContent":["import {\n START_ENVIRONMENT_NAMES,\n tanStackStartVite,\n} from '@tanstack/start-plugin-core'\nimport { vueStartDefaultEntryPaths } from './shared'\nimport type { TanStackStartVitePluginCoreOptions } from '@tanstack/start-plugin-core/vite/types'\nimport type { TanStackStartViteInputConfig } from '@tanstack/start-plugin-core'\nimport type { PluginOption } from 'vite'\n\nexport function tanstackStart(\n options?: TanStackStartViteInputConfig,\n): Array<PluginOption> {\n const corePluginOpts: TanStackStartVitePluginCoreOptions = {\n framework: 'vue',\n defaultEntryPaths: vueStartDefaultEntryPaths,\n providerEnvironmentName: START_ENVIRONMENT_NAMES.server,\n ssrIsProvider: true,\n ssrResolverStrategy: {\n type: 'default',\n },\n }\n\n return [\n {\n name: 'tanstack-vue-start:config',\n configEnvironment(environmentName, options) {\n return {\n optimizeDeps:\n environmentName === START_ENVIRONMENT_NAMES.client ||\n (environmentName === START_ENVIRONMENT_NAMES.server &&\n // This indicates that the server environment has opted in to dependency optimization\n options.optimizeDeps?.noDiscovery === false)\n ? {\n // As `@tanstack/vue-start` depends on `@tanstack/vue-router`, we should exclude both.\n exclude: [\n '@tanstack/vue-start',\n '@tanstack/vue-router',\n '@tanstack/start-static-server-functions',\n ],\n }\n : undefined,\n }\n },\n },\n tanStackStartVite(corePluginOpts, options),\n ]\n}\n"],"mappings":";;;AASA,SAAgB,cACd,SACqB;AAWrB,QAAO,CACL;EACE,MAAM;EACN,kBAAkB,iBAAiB,SAAS;AAC1C,UAAO,EACL,cACE,oBAAoB,wBAAwB,UAC3C,oBAAoB,wBAAwB,UAE3C,QAAQ,cAAc,gBAAgB,QACpC,EAEE,SAAS;IACP;IACA;IACA;IACD,EACF,GACD,KAAA,GACP;;EAEJ,EACD,kBAhCyD;EACzD,WAAW;EACX,mBAAmB;EACnB,yBAAyB,wBAAwB;EACjD,eAAe;EACf,qBAAqB,EACnB,MAAM,WACP;EACF,EAwBmC,QAAQ,CAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/vue-start",
3
- "version": "1.167.19",
3
+ "version": "1.167.21",
4
4
  "description": "Modern and scalable routing for Vue applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -23,6 +23,12 @@
23
23
  "async router",
24
24
  "typescript"
25
25
  ],
26
+ "scripts": {
27
+ "clean": "rimraf ./dist && rimraf ./coverage",
28
+ "test": "pnpm test:build",
29
+ "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .",
30
+ "build": "vite build && vite build -c vite.config.server-entry.ts"
31
+ },
26
32
  "type": "module",
27
33
  "types": "dist/esm/index.d.ts",
28
34
  "exports": {
@@ -100,21 +106,21 @@
100
106
  "node": ">=22.12.0"
101
107
  },
102
108
  "dependencies": {
103
- "pathe": "^2.0.3",
104
109
  "@tanstack/vue-start-client": "1.166.27",
105
110
  "@tanstack/vue-start-server": "1.166.27",
106
- "@tanstack/start-plugin-core": "1.167.18",
111
+ "@tanstack/start-plugin-core": "1.167.20",
107
112
  "@tanstack/vue-router": "1.168.12",
108
113
  "@tanstack/start-client-core": "1.167.10",
109
- "@tanstack/start-server-core": "1.167.10"
114
+ "@tanstack/start-server-core": "1.167.11",
115
+ "pathe": "^2.0.3"
110
116
  },
111
117
  "devDependencies": {
112
118
  "@tanstack/intent": "^0.0.14",
119
+ "@tanstack/router-utils": "1.161.6",
113
120
  "@vitejs/plugin-vue-jsx": "^4.1.2",
114
121
  "vite": "*",
115
122
  "vue": "^3.5.25",
116
- "@types/node": ">=20",
117
- "@tanstack/router-utils": "1.161.6"
123
+ "@types/node": ">=20"
118
124
  },
119
125
  "peerDependencies": {
120
126
  "vue": "^3.3.0",
@@ -122,11 +128,5 @@
122
128
  },
123
129
  "bin": {
124
130
  "intent": "./bin/intent.js"
125
- },
126
- "scripts": {
127
- "clean": "rimraf ./dist && rimraf ./coverage",
128
- "test": "pnpm test:build",
129
- "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .",
130
- "build": "vite build && vite build -c vite.config.server-entry.ts"
131
131
  }
132
- }
132
+ }
@@ -0,0 +1,17 @@
1
+ import { fileURLToPath } from 'node:url'
2
+ import path from 'pathe'
3
+
4
+ const currentDir = path.dirname(fileURLToPath(import.meta.url))
5
+ const defaultEntryDir = path.resolve(
6
+ currentDir,
7
+ '..',
8
+ '..',
9
+ 'plugin',
10
+ 'default-entry',
11
+ )
12
+
13
+ export const vueStartDefaultEntryPaths = {
14
+ client: path.resolve(defaultEntryDir, 'client.tsx'),
15
+ server: path.resolve(defaultEntryDir, 'server.ts'),
16
+ start: path.resolve(defaultEntryDir, 'start.ts'),
17
+ }
@@ -1,37 +1,33 @@
1
- import { fileURLToPath } from 'node:url'
2
1
  import {
3
- TanStackStartVitePluginCore,
4
- VITE_ENVIRONMENT_NAMES,
2
+ START_ENVIRONMENT_NAMES,
3
+ tanStackStartVite,
5
4
  } from '@tanstack/start-plugin-core'
6
- import path from 'pathe'
7
- import type { TanStackStartInputConfig } from '@tanstack/start-plugin-core'
5
+ import { vueStartDefaultEntryPaths } from './shared'
6
+ import type { TanStackStartVitePluginCoreOptions } from '@tanstack/start-plugin-core/vite/types'
7
+ import type { TanStackStartViteInputConfig } from '@tanstack/start-plugin-core'
8
8
  import type { PluginOption } from 'vite'
9
9
 
10
- const currentDir = path.dirname(fileURLToPath(import.meta.url))
11
- const defaultEntryDir = path.resolve(
12
- currentDir,
13
- '..',
14
- '..',
15
- 'plugin',
16
- 'default-entry',
17
- )
18
- const defaultEntryPaths = {
19
- client: path.resolve(defaultEntryDir, 'client.tsx'),
20
- server: path.resolve(defaultEntryDir, 'server.ts'),
21
- start: path.resolve(defaultEntryDir, 'start.ts'),
22
- }
23
-
24
10
  export function tanstackStart(
25
- options?: TanStackStartInputConfig,
11
+ options?: TanStackStartViteInputConfig,
26
12
  ): Array<PluginOption> {
13
+ const corePluginOpts: TanStackStartVitePluginCoreOptions = {
14
+ framework: 'vue',
15
+ defaultEntryPaths: vueStartDefaultEntryPaths,
16
+ providerEnvironmentName: START_ENVIRONMENT_NAMES.server,
17
+ ssrIsProvider: true,
18
+ ssrResolverStrategy: {
19
+ type: 'default',
20
+ },
21
+ }
22
+
27
23
  return [
28
24
  {
29
25
  name: 'tanstack-vue-start:config',
30
26
  configEnvironment(environmentName, options) {
31
27
  return {
32
28
  optimizeDeps:
33
- environmentName === VITE_ENVIRONMENT_NAMES.client ||
34
- (environmentName === VITE_ENVIRONMENT_NAMES.server &&
29
+ environmentName === START_ENVIRONMENT_NAMES.client ||
30
+ (environmentName === START_ENVIRONMENT_NAMES.server &&
35
31
  // This indicates that the server environment has opted in to dependency optimization
36
32
  options.optimizeDeps?.noDiscovery === false)
37
33
  ? {
@@ -46,12 +42,6 @@ export function tanstackStart(
46
42
  }
47
43
  },
48
44
  },
49
- TanStackStartVitePluginCore(
50
- {
51
- framework: 'vue',
52
- defaultEntryPaths,
53
- },
54
- options,
55
- ),
45
+ tanStackStartVite(corePluginOpts, options),
56
46
  ]
57
47
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021-present Tanner Linsley
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.