A clear and concise description of what the bug is.
cannot set babel plugin using onCreateBabelConfig function within gatsby-node.js
To Reproduce
create a gatsby-node.js file in the project root folder.
export the function
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: '@babel/plugin-proposal-decorators',
options: {
legacy: true
},
});
};
This setting is ignored,
Expected behavior
This setting should have been used.
In the .docz folder, there is a file called gatsby-node.js which is generated.
but only onCreateWebpackConfig function is described there.
If I directly used the above described onCreateBabelConfig function inside this file and then
built the project, it seems to be working.
Environment
you can do it by doczrc.js
just like this:
import { createPlugin } from "docz-core";
const myPlugin = () =>
createPlugin({
onCreateBabelConfig({ actions }) {
actions.setBabelPlugin({
name: "@babel/plugin-proposal-decorators",
options: { legacy: true }
});
}
});
export default {
plugins: [myPlugin()]
};
Tried the above code, could not get it to work. Got the following errror

Hey @nikitpatel24
@hvsy's code (thanks 馃憦) works for me.
Check out an example with @babel/plugin-proposal-decorators here : https://github.com/doczjs/docz-issue-1031
Indeed it works in the mentioned repo...thanks for your help.
Most helpful comment
you can do it by doczrc.js
just like this: