Skip to content

Commit 4525033

Browse files
committed
wip: fix define/modulePreloadPolyfill plugin
1 parent 6f0fd0d commit 4525033

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vite/src/node/plugins/define.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function definePlugin(config: ResolvedConfig): Plugin {
118118
return pattern
119119
}
120120

121-
if (isBuild && config.nativePluginEnabledLevel >= 1) {
121+
if (isBundled && config.nativePluginEnabledLevel >= 1) {
122122
return {
123123
name: 'vite:define',
124124
options(option) {

packages/vite/src/node/plugins/modulePreloadPolyfill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const modulePreloadPolyfillId = 'vite/modulepreload-polyfill'
88
const resolvedModulePreloadPolyfillId = '\0' + modulePreloadPolyfillId + '.js'
99

1010
export function modulePreloadPolyfillPlugin(config: ResolvedConfig): Plugin {
11-
if (config.command === 'build' && config.nativePluginEnabledLevel >= 1) {
11+
if (config.isBundled && config.nativePluginEnabledLevel >= 1) {
1212
return perEnvironmentPlugin(
1313
'native:modulepreload-polyfill',
1414
(environment) => {

0 commit comments

Comments
 (0)