Title: Proposal: Make ES6 Module Emit a "module" option · Issue #4806 · microsoft/TypeScript · GitHub
Open Graph Title: Proposal: Make ES6 Module Emit a "module" option · Issue #4806 · microsoft/TypeScript
X Title: Proposal: Make ES6 Module Emit a "module" option · Issue #4806 · microsoft/TypeScript
Description: I suggest we add "es6" as an option to the "module" flag, and the result of using it is getting ES6-style modules (import, export, and default keywords). It should be an error to choose "es6" as the module emit type when targeting below ...
Open Graph Description: I suggest we add "es6" as an option to the "module" flag, and the result of using it is getting ES6-style modules (import, export, and default keywords). It should be an error to choose "es6" as th...
X Description: I suggest we add "es6" as an option to the "module" flag, and the result of using it is getting ES6-style modules (import, export, and default keywords). It should be an error t...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/4806
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Make ES6 Module Emit a \"module\" option","articleBody":"I suggest we add `\"es6\"` as an option to the \"module\" flag, and the result of using it is getting ES6-style modules (import, export, and default keywords). It should be an error to choose `\"es6\"` as the module emit type when targeting below ES6. When targeting ES6 or above, this can remain the default module emit type.\n\nA primary personal driver for this is bundling, as bundling to an ES6 module when targeting ES6 is awkward (but possible) but bundling to other formats while still using the remaining ES6 feature set is very desirable, and, additionally, plays well into starting to break things out for #4692. A real world use would be compiling targeting node 4 - it supports most of our ES6 features, but _not_ ES6 modules, making our ES6 emit impossible to use without an additional transpiler. :(\nAdditionally, it would bring us inline with the [`systemjs` builder](https://github.com/systemjs/builder)'s output options, which are `amd`, `cjs`, and `es6`. \n","author":{"url":"https://github.com/weswigham","@type":"Person","name":"weswigham"},"datePublished":"2015-09-15T19:15:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4806/TypeScript/issues/4806"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0c1cd131-7354-1845-dee8-9d81e5bbbd5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED62:187E80:5472FE:727BD9:6A62D777 |
| html-safe-nonce | 89b5e1d3f12b162d00efaec6302d7b515f4239a8d09187a3ff18e623d73f7d14 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDYyOjE4N0U4MDo1NDcyRkU6NzI3QkQ5OjZBNjJENzc3IiwidmlzaXRvcl9pZCI6IjMzNjg1NjU4MDQzNDI4OTI0MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 05378b268afdb64f5d0bc843fee32faa1d46099e4fa5d4a1edf859b7f1f4ab07 |
| hovercard-subject-tag | issue:106625787 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/4806/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59dbdc5ea10dc988a6d8ee8eacbda67b303e803eac885d4b57361e29d83dc3ae/microsoft/TypeScript/issues/4806 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59dbdc5ea10dc988a6d8ee8eacbda67b303e803eac885d4b57361e29d83dc3ae/microsoft/TypeScript/issues/4806 |
| og:image:alt | I suggest we add "es6" as an option to the "module" flag, and the result of using it is getting ES6-style modules (import, export, and default keywords). It should be an error to choose "es6" as th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weswigham |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width