@tanstack/vue-start 1.167.19 → 1.167.20
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/esm/plugin/shared.d.ts +5 -0
- package/dist/esm/plugin/shared.js +14 -0
- package/dist/esm/plugin/shared.js.map +1 -0
- package/dist/esm/plugin/vite.d.ts +2 -2
- package/dist/esm/plugin/vite.js +8 -13
- package/dist/esm/plugin/vite.js.map +1 -1
- package/package.json +2 -2
- package/src/plugin/shared.ts +17 -0
- package/src/plugin/vite.ts +19 -29
|
@@ -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 {
|
|
1
|
+
import { TanStackStartViteInputConfig } from '@tanstack/start-plugin-core';
|
|
2
2
|
import { PluginOption } from 'vite';
|
|
3
|
-
export declare function tanstackStart(options?:
|
|
3
|
+
export declare function tanstackStart(options?: TanStackStartViteInputConfig): Array<PluginOption>;
|
package/dist/esm/plugin/vite.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 ===
|
|
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
|
-
},
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "1.167.20",
|
|
4
4
|
"description": "Modern and scalable routing for Vue applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"pathe": "^2.0.3",
|
|
104
104
|
"@tanstack/vue-start-client": "1.166.27",
|
|
105
105
|
"@tanstack/vue-start-server": "1.166.27",
|
|
106
|
-
"@tanstack/start-plugin-core": "1.167.
|
|
106
|
+
"@tanstack/start-plugin-core": "1.167.19",
|
|
107
107
|
"@tanstack/vue-router": "1.168.12",
|
|
108
108
|
"@tanstack/start-client-core": "1.167.10",
|
|
109
109
|
"@tanstack/start-server-core": "1.167.10"
|
|
@@ -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
|
+
}
|
package/src/plugin/vite.ts
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url'
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
START_ENVIRONMENT_NAMES,
|
|
3
|
+
tanStackStartVite,
|
|
5
4
|
} from '@tanstack/start-plugin-core'
|
|
6
|
-
import
|
|
7
|
-
import type {
|
|
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?:
|
|
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 ===
|
|
34
|
-
(environmentName ===
|
|
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
|
-
|
|
50
|
-
{
|
|
51
|
-
framework: 'vue',
|
|
52
|
-
defaultEntryPaths,
|
|
53
|
-
},
|
|
54
|
-
options,
|
|
55
|
-
),
|
|
45
|
+
tanStackStartVite(corePluginOpts, options),
|
|
56
46
|
]
|
|
57
47
|
}
|