-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
--modern flag ignored when using typescript #3205 #3206
Comments
We should probably mention that modern mode requires Babel, yeah. |
So I checked the docs and the section about modern mode starts with:
So the information is already there, but maybe it's not prominent enough. I'm thinking rather than adding another :::tip to that docs section, maybe we should augment the prompts messages for TS? Currently, we ask this when installing typescript:
We could extend it like this:
|
Ahh, I must've missed that, my bad. On that note, even without babel installed, the modern and legacy bundles are still generated and they both are legacy without warning iirc. I personally don't need the legacy support for older browsers so I don't want or need babel at all. Typescript can transpile to older versions of ecmascript too, so I thought --modern would work without babel. I think that's good, makes it more explicit that babel is a hard dependency needed for --modern. |
Version
3.2.1
Environment info
Steps to reproduce
vue-cli-service build --modern
What is expected?
It should compile to ES2015
What is actually happening?
It doesn't compile to ES2015 because you have to modify the .tsconfig target.
The target option in tsconfig is absolute, meaning if target: es2018 or if target:es2015, all code will be transpiled to said target in tsconfig regardless of --modern flag being used or not. This should be reflected in the docs or warn when using typescript.
The text was updated successfully, but these errors were encountered: