You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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");
The text was updated successfully, but these errors were encountered:
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 theimport
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");
The text was updated successfully, but these errors were encountered: