Conversation
Yeah what I had when testing it out previously https://gist.github.com/hzoo/6f393d0a24be191e25dee0bb894bb09e - there's some issue with asyncGenerator and IIFE (maybe it doesn't have to be one). Had more than a few reports of others experiencing the same issue |
You mean it is in there, although not needed? |
It's definetely not needed since our code doesn't use |
We could use the new whitelist option for now, although seems more like a temporary workaround rollup/rollup-plugin-babel#92 This describes the issue pretty good: http://stackoverflow.com/questions/40022087/using-the-whitelist-option-with-babels-external-helpers/40071679#40071679 |
Cool that sounds good |
dang wish I saved those other issues then to ping them |
Ok upgrading to rollup 0.37 removes the asyncGenerator, still get/set are included. |
I created a PR + issue at rollup for get/set |
7f836ef
to
767c931
Compare
767c931
to
8e5e967
Compare
8e5e967
to
ada4f46
Compare
Ok now finally with rollup 0.37.2 :) --- 2016-12-21 19:03:00 +0000
+++ 2016-12-21 19:03:00 +0000
@@ -124,7 +124,71 @@
return options;
}
-function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
+ return typeof obj;
+} : function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+};
+
+
+
+
+
+
+
+
+
+
+
+var classCallCheck = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+
+
+
+
+
+
+
+
+
+
+var inherits = function (subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
+ }
+
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
+};
+
+
+
+
+
+
+
+
+
+
+
+var possibleConstructorReturn = function (self, call) {
+ if (!self) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return call && (typeof call === "object" || typeof call === "function") ? call : self;
+};
// ## Token types
@@ -146,8 +210,7 @@
var TokenType = function TokenType(label) {
var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck$2(this, TokenType);
+ classCallCheck(this, TokenType);
this.label = label;
this.keyword = conf.keyword;
@@ -292,14 +355,12 @@
var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// The algorithm used to determine whether a regexp can appear at a
// given point in the program is loosely based on sweet.js' approach.
// See https://github.com/mozilla/sweet.js/wiki/design
var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
- _classCallCheck$3(this, TokContext);
+ classCallCheck(this, TokContext);
this.token = token;
this.isExpr = !!isExpr;
@@ -385,20 +446,18 @@
this.state.exprAllowed = false;
};
-function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// These are used when `options.locations` is on, for the
// `startLoc` and `endLoc` properties.
var Position = function Position(line, col) {
- _classCallCheck$4(this, Position);
+ classCallCheck(this, Position);
this.line = line;
this.column = col;
};
var SourceLocation = function SourceLocation(start, end) {
- _classCallCheck$4(this, SourceLocation);
+ classCallCheck(this, SourceLocation);
this.start = start;
this.end = end;
@@ -423,11 +482,9 @@
}
}
-function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
var State = function () {
function State() {
- _classCallCheck$5(this, State);
+ classCallCheck(this, State);
}
State.prototype.init = function init(options, input) {
@@ -558,8 +615,6 @@
return State;
}();
-function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
/* eslint indent: 0 */
// Object type used to represent tokens. Note that normally, tokens
@@ -567,7 +622,7 @@
// used for the onToken callback and the external tokenizer.
var Token = function Token(state) {
- _classCallCheck$1(this, Token);
+ classCallCheck(this, Token);
this.type = state.type;
this.value = state.value;
@@ -589,7 +644,7 @@
var Tokenizer = function () {
function Tokenizer(options, input) {
- _classCallCheck$1(this, Tokenizer);
+ classCallCheck(this, Tokenizer);
this.state = new State();
this.state.init(options, input);
@@ -1426,24 +1481,18 @@
return Tokenizer;
}();
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
var plugins = {};
var frozenDeprecatedWildcardPluginList = ["jsx", "doExpressions", "objectRestSpread", "decorators", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport", "flow"];
var Parser = function (_Tokenizer) {
- _inherits(Parser, _Tokenizer);
+ inherits(Parser, _Tokenizer);
function Parser(options, input) {
- _classCallCheck(this, Parser);
+ classCallCheck(this, Parser);
options = getOptions(options);
- var _this = _possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
+ var _this = possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
_this.options = options;
_this.inModule = _this.options.sourceType === "module";
@@ -1546,8 +1595,6 @@
return Parser;
}(Tokenizer);
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
var pp = Parser.prototype;
// ## Parser utilities
@@ -4177,8 +4224,6 @@
return this.finishNode(node, "YieldExpression");
};
-function _classCallCheck$6(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
// Start an AST node, attaching a start offset.
var pp$4 = Parser.prototype;
@@ -4186,7 +4231,7 @@
var Node = function () {
function Node(pos, loc, filename) {
- _classCallCheck$6(this, Node);
+ classCallCheck(this, Node);
this.type = "";
this.start = pos;
|
ada4f46
to
649582f
Compare
Add yarn.lock as recommended
649582f
to
24d490e
Compare
Use external-helpers and do not bundle comments
Add yarn.lock as recommended