Skip to content

Commit 5fe0550

Browse files
authored
fix: warn about dynamic import polyfill only during build (#3446)
1 parent cedc28d commit 5fe0550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/vite/src/node/plugins/dynamicImportPolyfill.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function dynamicImportPolyfillPlugin(config: ResolvedConfig): Plugin {
3131
},
3232
load(id) {
3333
if (id === polyfillId) {
34-
if (!enabled) {
34+
if (!enabled && config.command === 'build') {
3535
config.logger.warnOnce(
3636
`\n'vite/dynamic-import-polyfill' is no longer needed if you target modern browsers`
3737
)

0 commit comments

Comments
 (0)