Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should still transpile import statements for ES6 when --module commonjs #4900

Closed
markrendle opened this issue Sep 21, 2015 · 1 comment
Closed

Comments

@markrendle
Copy link

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");

@markrendle
Copy link
Author

Appears that this is already being discussed in #4389 - closing.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant