Skip to content

Commit

Permalink
fix: reduce babel/runtime error to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Wejendorp committed Oct 29, 2019
1 parent 0fa6a25 commit 40ac993
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/config/babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ const hasBabelRuntimeDep = Boolean(pkg.dependencies && pkg.dependencies['@babel/
const RUNTIME_HELPERS_WARN =
'You should add @babel/runtime as dependency to your package. It will allow reusing so-called babel helpers from npm rather than bundling their copies into your files.';

if (!treeshake && !hasBabelRuntimeDep) {
throw new Error(RUNTIME_HELPERS_WARN);
} else if (treeshake && !isUMD && !hasBabelRuntimeDep) {
if (!isUMD && !hasBabelRuntimeDep) {
console.warn(RUNTIME_HELPERS_WARN);
}

Expand Down

0 comments on commit 40ac993

Please sign in to comment.