Skip to content

Commit 5d0a087

Browse files
committed
- Blacklist strict mode in babel to be compatible with current version
1 parent caa8df4 commit 5d0a087

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

lib/react/jsx/babel_transformer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module React
33
module JSX
44
class BabelTransformer
55
DEPRECATED_OPTIONS = [:harmony, :strip_types, :asset_path]
6-
DEFAULT_TRANSFORM_OPTIONS = { blacklist: ['spec.functionName', 'validation.react'] }
6+
DEFAULT_TRANSFORM_OPTIONS = { blacklist: ['spec.functionName', 'validation.react', 'strict'] }
77
def initialize(options)
88
if (options.keys & DEPRECATED_OPTIONS).any?
99
ActiveSupport::Deprecation.warn("Setting config.react.jsx_transform_options for :harmony, :strip_types, and :asset_path keys is now deprecated and has no effect with the default Babel Transformer."+

test/react/jsx_test.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33

44
# Sprockets is inserting a newline after the docblock for some reason...
55
EXPECTED_JS = <<eos
6-
"use strict";
7-
86
React.createElement("div", null);
97
eos
108

119
EXPECTED_JS_2 = <<eos
12-
"use strict";
13-
1410
(function() {
1511
var Component;
1612

0 commit comments

Comments
 (0)