diff --git a/src/index.js b/src/index.js index ae624c4..3f4d634 100644 --- a/src/index.js +++ b/src/index.js @@ -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(