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

Document usage of babel.config.js files #1816

Closed
novemberborn opened this issue May 27, 2018 · 14 comments
Closed

Document usage of babel.config.js files #1816

novemberborn opened this issue May 27, 2018 · 14 comments

Comments

@novemberborn
Copy link
Member

novemberborn commented May 27, 2018

As of #1798 we support Babel 7 beta 48. This supports a new babel.config.js file.

We need to update our Babel recipe with examples of babel.config.js files. I think we may even be able to remove .babelrc examples, as I'm under the impression that this is the desired new config format for Babel 7.

We need to update our Babel integration tests (in test/api.js) so we're also testing babel.config.js files. We should change our default behavior so that both babelrc and config files are considered when compiling test & helper files. See:

const defaultOptions = {babelrc: true};

configFile: false,

@gajus

This comment has been minimized.

@novemberborn

This comment has been minimized.

@gajus

This comment has been minimized.

@novemberborn

This comment has been minimized.

@gajus

This comment has been minimized.

@novemberborn

This comment has been minimized.

@gajus

This comment has been minimized.

gajus added a commit to gajus/xfetch that referenced this issue May 28, 2018
@novemberborn

This comment has been minimized.

@danny-andrews
Copy link
Contributor

Just for clarification, does ava currently support babel.config.js? i.e., is this simply a documentation/test issue?

@kevva
Copy link
Contributor

kevva commented Oct 8, 2018

@danny-andrews, yes, if you add something like this to your ava config:

"babel": {
	"testOptions": {
		"configFile": "./babel.config.js"
	}
}

@novemberborn
Copy link
Member Author

We need to auto-detect it though, like we do .babelrc files. That's not implemented yet. We also need tests for that implementation, including what happens when both files are present.

Then, I'd like to update our documentation to use babel.config.js rather than .babelrc.

@kevva
Copy link
Contributor

kevva commented Oct 9, 2018

@novemberborn, wouldn't just providing configFile: true in defaultOptions work? Then it'd fallback to Babels own behaviour. And yeah, needs some tests too.

@novemberborn
Copy link
Member Author

@kevva yup, I just didn't want to do that without having tests and an understanding of how it all behaves.

@novemberborn novemberborn self-assigned this Oct 13, 2018
@novemberborn novemberborn changed the title Document usage and test support of babel.config.js files Document usage ~and test support~ of babel.config.js files Oct 14, 2018
@novemberborn novemberborn changed the title Document usage ~and test support~ of babel.config.js files Document usage of babel.config.js files Oct 14, 2018
@novemberborn
Copy link
Member Author

master now supports babel.config.js files, but we still need to update the documentation.

novemberborn added a commit that referenced this issue Nov 11, 2018
* Fix links between the various pages
* Remove outdated recipe on precompiling with webpack
* Update Babel documentation to remove bias towards .babelrc files. Fixes #1816.
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