Skip to content

Commit aefe583

Browse files
authored
Do not read .babelrc for cache identifier when babelrc=false (#483)
1 parent c8924f3 commit aefe583

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ module.exports = function(source, inputSourceMap) {
111111
// Handle options
112112
const loaderOptions = loaderUtils.getOptions(this) || {};
113113
const fileSystem = this.fs ? this.fs : fs;
114-
const babelrcPath = exists(fileSystem, loaderOptions.babelrc)
115-
? loaderOptions.babelrc
116-
: resolveRc(fileSystem, path.dirname(filename));
114+
let babelrcPath = null;
115+
if (loaderOptions.babelrc !== false) {
116+
babelrcPath = exists(fileSystem, loaderOptions.babelrc)
117+
? loaderOptions.babelrc
118+
: resolveRc(fileSystem, path.dirname(filename));
119+
}
117120

118121
if (babelrcPath) {
119122
this.addDependency(babelrcPath);

0 commit comments

Comments
 (0)