babel-loader 7.1.1 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  This package allows transpiling JavaScript files using [Babel](https://github.com/babel/babel) and [webpack](https://github.com/webpack/webpack).
17
17
 
18
- __Notes:__ Issues with the output should be reported on the babel [issue tracker](https://github.com/babel/babel/issues);
18
+ __Notes:__ Issues with the output should be reported on the babel [issue tracker](https://github.com/babel/babel/issues).
19
19
 
20
20
  <h2 align="center">Install</h2>
21
21
 
package/lib/index.js CHANGED
@@ -16,12 +16,13 @@ var fs = require("fs");
16
16
  */
17
17
  function BabelLoaderError(name, message, codeFrame, hideStack, error) {
18
18
  Error.call(this);
19
- Error.captureStackTrace(this, BabelLoaderError);
20
19
 
21
20
  this.name = "BabelLoaderError";
22
21
  this.message = formatMessage(name, message, codeFrame);
23
22
  this.hideStack = hideStack;
24
23
  this.error = error;
24
+
25
+ Error.captureStackTrace(this, BabelLoaderError);
25
26
  }
26
27
 
27
28
  BabelLoaderError.prototype = Object.create(Error.prototype);
@@ -109,7 +110,7 @@ module.exports = function (source, inputSourceMap) {
109
110
  var fileSystem = this.fs ? this.fs : fs;
110
111
  var babelrcPath = null;
111
112
  if (loaderOptions.babelrc !== false) {
112
- babelrcPath = exists(fileSystem, loaderOptions.babelrc) ? loaderOptions.babelrc : resolveRc(fileSystem, path.dirname(filename));
113
+ babelrcPath = typeof loaderOptions.babelrc === "string" && exists(fileSystem, loaderOptions.babelrc) ? loaderOptions.babelrc : resolveRc(fileSystem, path.dirname(filename));
113
114
  }
114
115
 
115
116
  if (babelrcPath) {
@@ -5,7 +5,9 @@ module.exports = function (fileSystem, filename) {
5
5
 
6
6
  try {
7
7
  exists = fileSystem.statSync(filename).isFile();
8
- } catch (e) {}
8
+ } catch (err) {
9
+ if (err.code !== "ENOENT") throw err;
10
+ }
9
11
 
10
12
  return exists;
11
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-loader",
3
- "version": "7.1.1",
3
+ "version": "7.1.2",
4
4
  "description": "babel module loader for webpack",
5
5
  "files": [
6
6
  "lib"
@@ -19,7 +19,7 @@
19
19
  "webpack": "2 || 3"
20
20
  },
21
21
  "devDependencies": {
22
- "ava": "^0.19.0",
22
+ "ava": "^0.22.0",
23
23
  "babel-cli": "^6.18.0",
24
24
  "babel-core": "^6.0.0",
25
25
  "babel-eslint": "^7.1.0",