wix-incubator / react-templates

Light weight templates for react
https://wix.github.io/react-templates
MIT License
2.82k stars 207 forks source link

wrong TypeScript output for imports #161

Closed nippur72 closed 8 years ago

nippur72 commented 8 years ago

The typescript output does not compile when using named imports because

import name = require("module").name;

is invalid typescript. It needs to be changed into:

import { name } from "module";

as for normal ES6. But while doing this we need to keep

import name = require("module");

in place of import * so to make it compatible with CommonJS and AMD.