Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change makes it so the user doesn't need to specify their plugins. If they want to override it they would need to modify the js loader config using the modifyWebpackConfig API. Ideally we would support a user provided .babelrc as well. ``` exports.modifyWebpackConfig = function(config, env) { config.removeLader('js') config.loader('js', { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel', query: { presets: [ 'babel-preset-react', 'babel-preset-es2015', 'babel-preset-stage-0', ].map(require.resolve), plugins: [ 'babel-plugin-add-module-exports', 'babel-plugin-transform-decorators-legacy', ].map(require.resolve), }, }) return config; } ``` Fixes gatsbyjs#235. Requires less user package.json dependencies unless the user wants to add babel plugins (Users no longer need to provide babel-plugins of any kind in their project as gatsby provides them)
- Loading branch information