Skip to content

Commit 2249635

Browse files
committed
fix: devToolsEnabled default value
1 parent 9287682 commit 2249635

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/core/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,19 @@ export type ResolvedOptions = Options &
124124

125125
function resolveOptions(rawOptions: Options): ResolvedOptions {
126126
const root = rawOptions.root ?? process.cwd()
127+
const isProduction =
128+
rawOptions.isProduction ?? process.env.NODE_ENV === 'production'
127129
return {
128130
...rawOptions,
129131
include: rawOptions.include ?? /\.vue$/,
130-
isProduction:
131-
rawOptions.isProduction ?? process.env.NODE_ENV === 'production',
132+
isProduction,
132133
ssr: rawOptions.ssr ?? false,
133134
sourceMap: rawOptions.sourceMap ?? true,
134135
root,
135136
customElement: rawOptions.customElement ?? /\.ce\.vue$/,
136137
reactivityTransform: rawOptions.reactivityTransform ?? false,
137138
compiler: rawOptions.compiler as any, // to be set in buildStart
138-
devToolsEnabled: process.env.NODE_ENV !== 'production',
139+
devToolsEnabled: !isProduction,
139140
cssDevSourcemap: false,
140141
inlineTemplate: rawOptions.inlineTemplate ?? true,
141142
}
1.25 KB
Binary file not shown.

0 commit comments

Comments
 (0)