Skip to content

Commit

Permalink
fix(babel7): do not load root .babelrc (#61)
Browse files Browse the repository at this point in the history
* Do not load root .babelrc

* Update index.js

* Update index.js
  • Loading branch information
ykzts authored and Kent C. Dodds committed Sep 12, 2018
1 parent b0f94b9 commit a3cd086
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.js
Expand Up @@ -27,7 +27,17 @@ function prevalPlugin(babel) {

comments.find(isPrevalComment).value = ' this file was prevaled'

const {code: string} = transformFromAst(path.node)
const {code: string} = transformFromAst(
path.node,
null,
/* istanbul ignore next (babel 6 vs babel 7 check) */
/^6\./.test(babel.version)
? {}
: {
babelrc: false,
configFile: false,
},
)
const replacement = getReplacement({string, fileOpts, babel})

const moduleExports = Object.assign(
Expand Down

0 comments on commit a3cd086

Please sign in to comment.