diff --git a/src/core/RecyclerListView.tsx b/src/core/RecyclerListView.tsx index b46260ba..54579976 100644 --- a/src/core/RecyclerListView.tsx +++ b/src/core/RecyclerListView.tsx @@ -18,7 +18,7 @@ * TODO: Observe size changes on web to optimize for reflowability * TODO: Solve //TSI */ -import debounce = require("lodash.debounce"); +import debounce from "lodash.debounce"; import * as PropTypes from "prop-types"; import * as React from "react"; import { ObjectUtil, Default } from "ts-object-utils"; diff --git a/src/platform/web/scrollcomponent/ScrollViewer.tsx b/src/platform/web/scrollcomponent/ScrollViewer.tsx index eaf32200..5ac9374b 100644 --- a/src/platform/web/scrollcomponent/ScrollViewer.tsx +++ b/src/platform/web/scrollcomponent/ScrollViewer.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import BaseScrollView, { ScrollEvent, ScrollViewDefaultProps } from "../../../core/scrollcomponent/BaseScrollView"; -import debounce = require("lodash.debounce"); +import debounce from "lodash.debounce"; import { ScrollEventNormalizer } from "./ScrollEventNormalizer"; /*** diff --git a/tsconfig.json b/tsconfig.json index c9400d72..52de4650 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { "lib": ["es6", "dom"], // target Node.js(v6) "types": ["react", "react-native"], - "module": "commonjs", // export compatibility - "target": "es5", // target Node.js(v6) - "moduleResolution": "node", // target Node.js(v6) + "module": "es6", + "target": "es6", + "moduleResolution": "node", "declaration": true, // generate TypeScript definitions "rootDir": "src", "strict": true, @@ -12,6 +12,7 @@ "removeComments": false, "jsx": "react", "sourceMap": true, - "skipLibCheck": true + "skipLibCheck": true, + "esModuleInterop": true // to import a single function like lodash/debounce which is not a default export } }