Skip to content

Commit

Permalink
enable esModuleInterop for subapp2 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Jan 7, 2021
1 parent 4c84a2d commit 106cb3e
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/src/browser/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-env browser */
// import * as React from "react";
// import React from "react";
// import { render, hydrate } from "react-dom";
// import { Provider } from "react-redux";
import { setStoreContainer } from "../common/redux-shared-store";
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/tsconfig.browser.es2x.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2019",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/tsconfig.browser.es5.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES5",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/tsconfig.node.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-redux/tsconfig.node.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-router/tsconfig.browser.es2x.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2019",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-router/tsconfig.browser.es5.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES5",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "dist",
"lib": ["es2018"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-router/tsconfig.node.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react-router/tsconfig.node.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/src/common/app-context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as React from "react";
import React from "react";

export const AppContext = React.createContext({});
6 changes: 3 additions & 3 deletions packages/xarc-react/src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import * as ReactDom from "react-dom";
import * as ReactDomServer from "react-dom/server";
import React from "react";
import ReactDom from "react-dom";
import ReactDomServer from "react-dom/server";
import { FrameworkLib, SubAppOptions, SubApp, SubAppFeatureFactory, SubAppDef } from "@xarc/subapp";

export type ReactSubApp = SubApp<React.Component>;
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/tsconfig.browser.es2x.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2019",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/tsconfig.browser.es5.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES5",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-node-cjs",
"lib": ["es2018"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/tsconfig.node.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/tsconfig.node.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxFactory": "createElement",
"lib": ["es2018"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/xarc-subapp/src/node/init-v2.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-console, max-statements, global-require, @typescript-eslint/no-var-requires */

import * as Path from "path";
import Path from "path";
import { generateNonce, loadCdnMap, mapCdn, wrapStringFragment, urlJoin } from "./utils";
import { WebpackStats } from "./webpack-stats";
import * as Crypto from "crypto";
import Crypto from "crypto";
import { AssetPathMap, InitProps } from "./types";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/src/node/load-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* - generate code to bootstrap subapp on client
*/

import * as _ from "lodash";
import _ from "lodash";
import { getContainer } from "./index";

// global name to store client subapp runtime, ie: window.xarcV1
Expand Down
8 changes: 4 additions & 4 deletions packages/xarc-subapp/src/node/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Path from "path";
import * as Fs from "fs";
import * as Crypto from "crypto";
import Path from "path";
import Fs from "fs";
import Crypto from "crypto";
import { NonceInfo, InitProps } from "./types";
import * as Url from "url";
import Url from "url";

export function loadCdnMap(cdnMap: string): any {
const fullPath = Path.isAbsolute(cdnMap)
Expand Down
4 changes: 2 additions & 2 deletions packages/xarc-subapp/src/node/webpack-stats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Fs from "fs";
import * as Path from "path";
import Fs from "fs";
import Path from "path";

/**
* For loading and accessing stats data from webpack compile
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/tsconfig.browser.es2x.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-browser~es2x~esm~",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2019",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/tsconfig.browser.es5.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-browser~es5~cjs~",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES5",
"preserveConstEnums": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-node-cjs",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/tsconfig.node.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-node-cjs",
"lib": ["es2018", "DOM"],
"module": "CommonJS",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-subapp/tsconfig.node.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "dist-node-esm",
"lib": ["es2018", "DOM"],
"module": "ES2020",
"esModuleInterop": false,
"esModuleInterop": true,
"importHelpers": true,
"target": "ES2018",
"preserveConstEnums": true,
Expand Down

0 comments on commit 106cb3e

Please sign in to comment.