Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

README #53

Open
PaulieScanlon opened this issue Jan 23, 2020 · 5 comments
Open

README #53

PaulieScanlon opened this issue Jan 23, 2020 · 5 comments

Comments

@PaulieScanlon
Copy link

Hey,

In the README should it be this 👇

{
    "presets": [
        "@babel/preset-env",
        "@babel/preset-typescript"
    ],
...
}

rather than this 👇

{
    "presets": [
        "@babel/env",
        "@babel/typescript"
    ],
...
}
@orta
Copy link
Contributor

orta commented Jan 23, 2020

Are you sure? We had a PR only this week which updated them and kept them the same: https://github.com/microsoft/TypeScript-Babel-Starter/pull/52/files#diff-04c6e90faac2675aa89e2176d2eec7d8R48

@PaulieScanlon
Copy link
Author

@orta i'm sure in the readme i can see

"@babel/env"

but i'm wondering if it should be..

"@babel/preset-env"

Just a general question really... thoughts?

@aplum
Copy link

aplum commented Feb 14, 2020

The docs at https://babeljs.io/docs/en/options#name-normalization indicate that @babel/env will be normalized to @babel/preset-env, so either will work in Babel's configuration file.

My personal preference is to use the full name @babel/preset-env, so if I search a project for any dependency in package.json then any references to that dependency will show up.

@joebowbeer
Copy link

joebowbeer commented Feb 14, 2020

I prefer the abbreviated form. My policy is that if any are abbreviated then all are abbreviated.

More to the point, notice that the plugin name is also abbreviated in the README. (Sans "plugin-".)

Either way, I think this is a good place in the README to point out the equivalence.

Note, too, that the plugin suggested in the README is now included by preset-env.

@orta
Copy link
Contributor

orta commented Feb 14, 2020

This repo isn't really the place for us to teach those kind of things about babel's config resolving.

I don't have a strong opinion either way - if someone makes a PR and the entire thing is consistent then I'll merge it - but if not then we'll keep it as is 👍

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

4 participants