babel-loader 8.0.0-beta.3 → 8.0.0-beta.4

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.
Files changed (2) hide show
  1. package/lib/transform.js +12 -3
  2. package/package.json +4 -1
package/lib/transform.js CHANGED
@@ -22,11 +22,18 @@ function () {
22
22
  throw err.message && err.codeFrame ? new LoaderError(err) : err;
23
23
  }
24
24
 
25
- if (!result) return null;
25
+ if (!result) return null; // We don't return the full result here because some entries are not
26
+ // really serializable. For a full list of properties see here:
27
+ // https://github.com/babel/babel/blob/master/packages/babel-core/src/transformation/index.js
28
+ // For discussion on this topic see here:
29
+ // https://github.com/babel/babel-loader/pull/629
30
+
26
31
  const {
32
+ ast,
27
33
  code,
28
34
  map,
29
- metadata
35
+ metadata,
36
+ sourceType
30
37
  } = result;
31
38
 
32
39
  if (map && (!map.sourcesContent || !map.sourcesContent.length)) {
@@ -34,9 +41,11 @@ function () {
34
41
  }
35
42
 
36
43
  return {
44
+ ast,
37
45
  code,
38
46
  map,
39
- metadata
47
+ metadata,
48
+ sourceType
40
49
  };
41
50
  });
42
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-loader",
3
- "version": "8.0.0-beta.3",
3
+ "version": "8.0.0-beta.4",
4
4
  "description": "babel module loader for webpack",
5
5
  "files": [
6
6
  "lib"
@@ -53,6 +53,9 @@
53
53
  "test": "yarn run lint && cross-env BABEL_ENV=test yarn run build && yarn run test-only",
54
54
  "test-only": "nyc ava"
55
55
  },
56
+ "publishConfig": {
57
+ "tag": "next"
58
+ },
56
59
  "repository": {
57
60
  "type": "git",
58
61
  "url": "https://github.com/babel/babel-loader.git"