Skip to content

Commit 7970d40

Browse files
benmonroBen Monro
authored andcommitted
feat(test): don't warn about @babel/runtime for tests (#87)
Co-authored-by: Ben Monro <ben.monro@pwc.com>
1 parent 163f4b3 commit 7970d40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config/babelrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const hasBabelRuntimeDep = Boolean(
1919
const RUNTIME_HELPERS_WARN =
2020
'You should add @babel/runtime as dependency to your package. It will allow reusing "babel helpers" from node_modules rather than bundling their copies into your files.'
2121

22-
if (!treeshake && !hasBabelRuntimeDep) {
22+
if (!treeshake && !hasBabelRuntimeDep && !isTest) {
2323
throw new Error(RUNTIME_HELPERS_WARN)
2424
} else if (treeshake && !isUMD && !hasBabelRuntimeDep) {
2525
console.warn(RUNTIME_HELPERS_WARN)

0 commit comments

Comments
 (0)