Skip to content

Commit

Permalink
fix: enable esModuleInterop (#85)
Browse files Browse the repository at this point in the history
Resolves #77
  • Loading branch information
dpilch committed Sep 20, 2021
1 parent 73fac18 commit 32eac19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,14 @@ export default function BoxWithButton(props) {

exports[`amplify render tests custom render config should render common JS 1`] = `
"\\"use strict\\";
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, \\"__esModule\\", { value: true });
/* eslint-disable */
const react_1 = require(\\"react\\");
const react_1 = __importDefault(require(\\"react\\"));
const ui_react_1 = require(\\"@aws-amplify/ui-react\\");
function BoxWithButton(props) {
return react_1.default.createElement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export abstract class ReactStudioTemplateRenderer extends StudioTemplateRenderer
target,
module,
jsx: script === ScriptKind.JS ? ts.JsxEmit.React : ts.JsxEmit.Preserve,
esModuleInterop: true,
},
}).outputText;

Expand Down

0 comments on commit 32eac19

Please sign in to comment.