Closed
Description
Node.js 4.x now supports enough ES6 syntax that it is desirable to use --target ES6
.
But when you specify ES6
, TypeScript stops transpiling the import statements, even when the --module commonjs
flag is supplied, and Node does not (and apparently will never) support the import
syntax.
The combination --target ES6 --module commonjs
should result in regular ES6 output but with e.g.
import * as express from "express";
transpiled to
var express = require("express");
Activity
ThatRendle commentedon Sep 21, 2015
Appears that this is already being discussed in #4389 - closing.