force experimental and playground flag when whitelisting/optionalising transformers
This commit is contained in:
@@ -176,6 +176,15 @@ File.prototype.normalizeOptions = function (opts) {
|
||||
"`reactCompat` - backwards compatibility will be removed in v4.0.0");
|
||||
}
|
||||
|
||||
var ensureEnabled = function (key) {
|
||||
var namespace = transform.namespaces[key];
|
||||
if (namespace === "playground") opts.playground = true;
|
||||
if (namespace === "experimental") opts.experimental = true;
|
||||
};
|
||||
|
||||
each(opts.whitelist, ensureEnabled);
|
||||
each(opts.optional, ensureEnabled);
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user