This is the entire babel.config.js file babel.config.js .
module.exports = function (api) { api.cache(true); const presets = ["@babel/preset-env", "@babel/preset-react"]; const plugins = [ ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }], "c:\\projects\\my-babel-plugin" ]; return { presets, plugins }; }
The first element in the array of plugins is a plugin with options in the form of an array. The second point is my own local plugin.
Inside my-babel-plugin should be package.json with the entry "main", usually "main": "lib/index.js" or "main": "src/index.js" .
source share