@xysfe/vite-plugin-dev-proxy 1.0.1 → 1.0.2
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/index.cjs +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -218,6 +218,9 @@ function viteDevProxy(options = {}) {
|
|
|
218
218
|
return {
|
|
219
219
|
name: "vite-plugin-dev-proxy",
|
|
220
220
|
config: (viteConfig) => {
|
|
221
|
+
if (process.env.NODE_ENV !== "development") {
|
|
222
|
+
return {};
|
|
223
|
+
}
|
|
221
224
|
const pluginProxy = createProxyConfig(options);
|
|
222
225
|
const existingProxy = viteConfig.server?.proxy || {};
|
|
223
226
|
const mergedProxy = {
|
package/dist/index.mjs
CHANGED
|
@@ -211,6 +211,9 @@ function viteDevProxy(options = {}) {
|
|
|
211
211
|
return {
|
|
212
212
|
name: "vite-plugin-dev-proxy",
|
|
213
213
|
config: (viteConfig) => {
|
|
214
|
+
if (process.env.NODE_ENV !== "development") {
|
|
215
|
+
return {};
|
|
216
|
+
}
|
|
214
217
|
const pluginProxy = createProxyConfig(options);
|
|
215
218
|
const existingProxy = viteConfig.server?.proxy || {};
|
|
216
219
|
const mergedProxy = {
|
package/package.json
CHANGED