Skip to content

Commit

Permalink
fix: warn only during build
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 17, 2021
1 parent cac1991 commit 535ccc0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vite/src/node/plugins/dynamicImportPolyfill.ts
Expand Up @@ -31,6 +31,11 @@ export function dynamicImportPolyfillPlugin(config: ResolvedConfig): Plugin {
},
load(id) {
if (id === polyfillId) {
if (!enabled && config.command === 'build') {
config.logger.warnOnce(
`\n'vite/dynamic-import-polyfill' is no longer needed if you target modern browsers`
)
}
if (skip) {
return ''
}
Expand Down

0 comments on commit 535ccc0

Please sign in to comment.