@netlify/vite-plugin 0.3.0 → 1.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 CHANGED
@@ -1,6 +1,7 @@
1
1
  # @netlify/vite-plugin
2
2
 
3
- > [!WARNING] This is an experimental Vite plugin for Netlify. It is under active development and does **not** yet support all Netlify platform features.
3
+ > [!WARNING] This is an experimental Vite plugin for Netlify. It is under active development and does **not** yet
4
+ > support all Netlify platform features.
4
5
 
5
6
  A Vite plugin that integrates with Netlify's platform features.
6
7
 
@@ -14,9 +15,11 @@ npm install @netlify/vite-plugin
14
15
 
15
16
  The plugin accepts the following options:
16
17
 
17
- - `middleware` (boolean, default: `true`): Attach a Vite middleware that intercepts requests and handles them in the same way as the Netlify production environment
18
+ - `middleware` (boolean, default: `true`): Attach a Vite middleware that intercepts requests and handles them in the
19
+ same way as the Netlify production environment
18
20
  - `blobs`: Configure blob storage functionality
19
21
  - `functions`: Configure serverless functions
22
+ - `headers`: Configure response headers
20
23
  - `redirects`: Configure URL redirects
21
24
  - `staticFiles`: Configure static file serving
22
25
 
@@ -29,6 +32,6 @@ import { defineConfig } from 'vite'
29
32
  import netlify from '@netlify/vite-plugin'
30
33
 
31
34
  export default defineConfig({
32
- plugins: [netlify()]
35
+ plugins: [netlify()],
33
36
  })
34
37
  ```
package/dist/main.js CHANGED
@@ -1,11 +1,11 @@
1
1
  // src/main.ts
2
- import process from "node:process";
2
+ import process from "process";
3
3
  import { NetlifyDev } from "@netlify/dev";
4
4
 
5
5
  // src/lib/logger.ts
6
6
  import chalk from "chalk";
7
7
  var NETLIFY_CYAN = chalk.rgb(40, 180, 170);
8
- var banner = NETLIFY_CYAN("\u25C8 Netlify \u25C8");
8
+ var banner = NETLIFY_CYAN("\u2B25 Netlify \u2B25");
9
9
  var logger = {
10
10
  error: (...data) => data.length === 0 ? console.error(...data) : console.error(banner, ...data),
11
11
  log: (...data) => data.length === 0 ? console.log(...data) : console.log(banner, ...data),
@@ -13,7 +13,7 @@ var logger = {
13
13
  };
14
14
 
15
15
  // src/lib/reqres.ts
16
- import { Readable } from "node:stream";
16
+ import { Readable } from "stream";
17
17
  var normalizeHeaders = (headers) => {
18
18
  const result = [];
19
19
  for (const [key, value] of Object.entries(headers)) {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@netlify/vite-plugin",
3
- "version": "0.3.0",
3
+ "version": "1.0.0",
4
4
  "description": "Vite plugin with a local emulation of the Netlify environment",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=16.0.0"
7
+ "node": "^18.14.0 || >=20"
8
8
  },
9
9
  "main": "./dist/main.js",
10
10
  "exports": "./dist/main.js",
@@ -35,7 +35,7 @@
35
35
  "vitest": "^3.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@netlify/dev": "2.3.0",
38
+ "@netlify/dev": "3.0.0",
39
39
  "chalk": "^5.4.1"
40
40
  },
41
41
  "peerDependencies": {