Skip to content

Commit

Permalink
fix:@fourze/vite params.
Browse files Browse the repository at this point in the history
  • Loading branch information
chizuki committed Jul 22, 2022
1 parent 1869bc3 commit 8250f83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Plugin } from "vite"

import { FourzeBaseRoute, logger } from "@fourze/core"

import { createRouter, FourzeProxyOption, FourzeRouter, createApp } from "@fourze/server"
import { createApp, createRouter, FourzeProxyOption, FourzeRouter } from "@fourze/server"
import { mockJs } from "./mock"

const PLUGIN_NAME = "vite-plugin-fourze"
Expand Down Expand Up @@ -100,7 +100,7 @@ export function VitePluginFourze(options: VitePluginFourzeOptions = {}): Plugin
},

config(config, env) {
options.mock = options.mock ?? env.mode === "mock"
options.mock = options.mock ?? (env.command == "build" || env.mode === "mock")
return {
define: {
VITE_PLUGIN_FOURZE_MOCK: options.mock
Expand Down

0 comments on commit 8250f83

Please sign in to comment.