diff --git a/src/index.js b/src/index.js index 36c3d641..ca5f2e0d 100644 --- a/src/index.js +++ b/src/index.js @@ -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);