@netlify/vite-plugin-tanstack-start 0.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/README.md +44 -0
- package/dist/main.d.ts +17 -0
- package/dist/main.js +15 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @netlify/vite-plugin-tanstack-start
|
|
2
|
+
|
|
3
|
+
This Vite plugin configures your TanStack Start app for **deployment** to Netlify and provides full local emulation of
|
|
4
|
+
the Netlify platform directly in `vite dev`.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- Configures `vite build` to prepare your app's production build for deployment to Netlify
|
|
9
|
+
- See
|
|
10
|
+
[full TanStack Start deployment docs for more](https://docs.netlify.com/build/frameworks/framework-setup-guides/tanstack-start/#deploy-to-netlify)
|
|
11
|
+
- Configures `vite dev` to behave just like the production Netlify platform, but locally on your machine
|
|
12
|
+
- This has all the same features as `@netlify/vite-plugin`.
|
|
13
|
+
[Check out its docs for details](/packages/vite-plugin/README.md).
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -D @netlify/vite-plugin-tanstack-start
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configuration options
|
|
22
|
+
|
|
23
|
+
The plugin accepts the following options:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
{
|
|
27
|
+
edgeSSR: boolean, // Deploy your app to Netlify Edge Functions (default: false)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Add the plugin to your `vite.config.js` or `vite.config.ts`:
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import { defineConfig } from 'vite'
|
|
37
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
38
|
+
import react from '@vitejs/plugin-react'
|
|
39
|
+
import netlify from '@netlify/vite-plugin-tanstack-start'
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
plugins: [tanstackStart(), react(), netlify()],
|
|
43
|
+
})
|
|
44
|
+
```
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as vite from 'vite';
|
|
2
|
+
import { Features } from '@netlify/dev';
|
|
3
|
+
|
|
4
|
+
interface PluginOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Deploy SSR handler to Netlify Edge Functions instead of Netlify Functions (default: false).
|
|
7
|
+
*/
|
|
8
|
+
edgeSSR?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Optional configuration of Netlify dev features
|
|
11
|
+
* @see {link https://www.npmjs.com/package/@netlify/vite-plugin}
|
|
12
|
+
*/
|
|
13
|
+
dev?: Features;
|
|
14
|
+
}
|
|
15
|
+
declare function createNetlifyTanstackStartPlugin(options?: PluginOptions): vite.Plugin<any>[];
|
|
16
|
+
|
|
17
|
+
export { type PluginOptions, createNetlifyTanstackStartPlugin as default };
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/main.ts
|
|
2
|
+
import createNetlifyPlugin from "@netlify/vite-plugin";
|
|
3
|
+
function createNetlifyTanstackStartPlugin(options = {}) {
|
|
4
|
+
const netlifyPlugin = createNetlifyPlugin({
|
|
5
|
+
build: {
|
|
6
|
+
enabled: true,
|
|
7
|
+
edgeSSR: options.edgeSSR ?? false
|
|
8
|
+
},
|
|
9
|
+
...options.dev
|
|
10
|
+
});
|
|
11
|
+
return netlifyPlugin;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
createNetlifyTanstackStartPlugin as default
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@netlify/vite-plugin-tanstack-start",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Vite plugin for TanStack Start on Netlify",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.12.0"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/main.js",
|
|
10
|
+
"exports": "./dist/main.js",
|
|
11
|
+
"types": "./dist/main.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/**/*"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsup-node",
|
|
17
|
+
"prepack": "npm run build",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:dev": "vitest",
|
|
20
|
+
"test:ci": "vitest run",
|
|
21
|
+
"dev": "tsup-node --watch",
|
|
22
|
+
"publint": "npx -y publint --strict"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"netlify",
|
|
26
|
+
"tanstack",
|
|
27
|
+
"tanstack-start",
|
|
28
|
+
"vite-plugin",
|
|
29
|
+
"dev",
|
|
30
|
+
"build"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": "netlify/primitives",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/netlify/primitives/issues"
|
|
36
|
+
},
|
|
37
|
+
"author": "Netlify Inc.",
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@netlify/dev-utils": "^4.1.3",
|
|
40
|
+
"@types/node": "^22.18.5",
|
|
41
|
+
"normalize-package-data": "^8.0.0",
|
|
42
|
+
"playwright": "^1.52.0",
|
|
43
|
+
"tsup": "^8.0.0",
|
|
44
|
+
"vite": "^7.1.5",
|
|
45
|
+
"vitest": "^3.0.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@netlify/dev": "^4.5.9",
|
|
49
|
+
"@netlify/vite-plugin": "^2.5.10"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@tanstack/react-start": "alpha",
|
|
53
|
+
"@tanstack/solid-start": "alpha",
|
|
54
|
+
"vite": ">=7.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"@tanstack/react-start": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"@tanstack/solid-start": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|