-
Notifications
You must be signed in to change notification settings - Fork 10.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
ES6 Modules #468
Comments
This is an oddity around Babel and .babelrc. Gatsby sets Webpack up to load JS files for your project JS files using babel-loader but afaik doesn't let you use the same babel-loader setup for loading custom loaders. Those only use Babel if you put a I removed the .babelrcs from the official starters recently which is perhaps is causing the problem you're seeing? So the easiest thing you can do is to just drop a .babelrc in your project e.g. restore gatsbyjs/gatsby-starter-default@ba341b9 It'd also be great if you wanted to investigate if there's a way to make Webpack load loaders using babel-loader. I don't think there is but it'd be nice. |
@KyleAMathews I have a similar, I don't want open up another issue. In
This throws me the same error, even though I added a .babelrc and downloaded babel-present-env. |
Issue
In the latest build of Gatsby, loaders doesn't seem to work with ES6 modules'
import/export
, even though sample loaders are written with those.The issue occurs when I try to modify a loader, if I leave them as they are after installation, nothing seems to happen.
import/export
seem to work perfectly forpages/
.Specs
Gatsby ver. -
0.12.9
Node ver. -
v5.0.0
OS - macOS Sierra v10.12
The text was updated successfully, but these errors were encountered: