Skip to content

Commit

Permalink
fix: warn about dynamic import polyfill only during build (#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 17, 2021
1 parent cedc28d commit 5fe0550
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 5fe0550

Please sign in to comment.