Skip to content

Commit

Permalink
Do not read .babelrc for cache identifier when babelrc=false (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
danez authored Jun 25, 2017
1 parent c8924f3 commit aefe583
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ module.exports = function(source, inputSourceMap) {
// Handle options
const loaderOptions = loaderUtils.getOptions(this) || {};
const fileSystem = this.fs ? this.fs : fs;
const babelrcPath = exists(fileSystem, loaderOptions.babelrc)
? loaderOptions.babelrc
: resolveRc(fileSystem, path.dirname(filename));
let babelrcPath = null;
if (loaderOptions.babelrc !== false) {
babelrcPath = exists(fileSystem, loaderOptions.babelrc)
? loaderOptions.babelrc
: resolveRc(fileSystem, path.dirname(filename));
}

if (babelrcPath) {
this.addDependency(babelrcPath);
Expand Down

0 comments on commit aefe583

Please sign in to comment.