@netlify/vite-plugin 0.2.1 → 0.2.4

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/main.d.ts CHANGED
@@ -9,4 +9,4 @@ interface NetlifyPluginOptions extends Features {
9
9
  }
10
10
  declare function netlify(options?: NetlifyPluginOptions): any;
11
11
 
12
- export { type NetlifyPluginOptions, netlify };
12
+ export { type NetlifyPluginOptions, netlify as default };
package/dist/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/main.ts
2
+ import process from "node:process";
2
3
  import { NetlifyDev } from "@netlify/dev";
3
4
 
4
5
  // src/lib/logger.ts
@@ -60,6 +61,9 @@ var fromWebResponse = async (webRes, res) => {
60
61
 
61
62
  // src/main.ts
62
63
  function netlify(options = {}) {
64
+ if (process.env.NETLIFY_DEV) {
65
+ return [];
66
+ }
63
67
  const plugin = {
64
68
  name: "vite-plugin-netlify",
65
69
  async configureServer(viteDevServer) {
@@ -96,5 +100,5 @@ function netlify(options = {}) {
96
100
  return [plugin];
97
101
  }
98
102
  export {
99
- netlify
103
+ netlify as default
100
104
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@netlify/vite-plugin",
3
- "version": "0.2.1",
4
- "description": "Netlify Vite plugin",
3
+ "version": "0.2.4",
4
+ "description": "Vite plugin with a local emulation of the Netlify environment",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=16.0.0"
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "author": "Netlify Inc.",
29
29
  "devDependencies": {
30
- "@types/node": "^22.14.1",
30
+ "@types/node": "^20.5.1",
31
31
  "tsup": "^8.0.0",
32
32
  "vite": "^6.3.4",
33
33
  "vitest": "^3.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@netlify/dev": "2.1.1",
36
+ "@netlify/dev": "2.2.1",
37
37
  "chalk": "^5.4.1"
38
38
  },
39
39
  "peerDependencies": {