Skip to content

Commit

Permalink
fix: warn about dynamic import polyfill only during build (vitejs#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored and fi3ework committed May 22, 2021
1 parent bed6c7e commit a82b25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/dynamicImportPolyfill.ts
Expand Up @@ -31,7 +31,7 @@ export function dynamicImportPolyfillPlugin(config: ResolvedConfig): Plugin {
},
load(id) {
if (id === polyfillId) {
if (!enabled) {
if (!enabled && config.command === 'build') {
config.logger.warnOnce(
`\n'vite/dynamic-import-polyfill' is no longer needed if you target modern browsers`
)
Expand Down

0 comments on commit a82b25c

Please sign in to comment.