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

More helpful Babel defaults #1768

Closed
texastoland opened this issue Jul 21, 2018 · 1 comment
Closed

More helpful Babel defaults #1768

texastoland opened this issue Jul 21, 2018 · 1 comment

Comments

@texastoland
Copy link

texastoland commented Jul 21, 2018

🙋 feature request

Additional Babel plugins notably:

🤔 Expected Behavior

Import a typical React project requires no setup.

😯 Current Behavior

Import a typical setup requires knowing you need plugins and which, manually adding them individually or with babel-preset-stage-x (multiple choices), knowing how to config, and manually adding a config (2 choices where). We're accustomed to starting every project that way but not as welcoming as it could be.

💁 Possible Solution

Additional Babel plugins

Add inside getEnvConfig and getJSXConfig respectively here:

let envConfig = await getEnvConfig(asset, isSource);
let jsxConfig = await getJSXConfig(asset, isSource);

Auto-import plugins

localRequire all presets and plugins from getBabelConfig here:

async function getConfig(asset) {
let config = await getBabelConfig(asset);
if (config) {

🔦 Context

#1632
"Fastest/easiest way to add Object spread to @parceljs ?"
"Just make sure to include babel-plugin-macros so your users can enjoy some zero config Babel plugin transforms too! 👍"

💻 Examples

TypeScript-Babel-Starter

@davidnagli
Copy link
Contributor

davidnagli commented Jul 22, 2018

See my PR addressing your 'Auto-import plugins' point: #1772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants