We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 873d982 commit b02953dCopy full SHA for b02953d
src/ctx.tsx
@@ -18,17 +18,10 @@ class Ctx implements IStringToReactApi {
18
}
19
this._getBabel = () => Babel;
20
21
- _getBabelDefaultOptions(): TransformOptions {
22
- return {
23
- sourceMaps: 'inline',
24
- sourceType: 'module',
25
- };
26
- }
27
_checkBabelOptions(babelOptions: TransformOptions) {
28
if (Object.prototype.toString.call(babelOptions) !== '[object Object]') {
29
throw new Error(`babelOptions prop of string-to-react-component element should be an object.`);
30
31
- Object.assign(babelOptions, this._getBabelDefaultOptions(), babelOptions);
32
if (Object.prototype.hasOwnProperty.call(babelOptions, 'presets') === false) {
33
babelOptions.presets = ['react'];
34
} else {
0 commit comments