I have a pretty simple webpack config file that looks like this:
plugins: [
["@babel/transform-runtime", { regenerator: true }],
"@babel/plugin-transform-react-jsx",
["@babel/plugin-proposal-decorators", { legacy: true }],
["@babel/plugin-proposal-class-properties", { loose: true }],
["@babel/plugin-proposal-private-methods", { loose: true }],
["@babel/plugin-proposal-private-property-in-object", { loose: true }],
"babel-plugin-jsx-control-statements",
],
with other things on the top and bottom, and I added the following:
plugins: [
["@babel/transform-runtime", { regenerator: true }],
"@babel/plugin-transform-react-jsx",
["@babel/plugin-proposal-decorators", { legacy: true }],
["@babel/plugin-proposal-class-properties", { loose: true }],
["@babel/plugin-proposal-private-methods", { loose: true }],
["@babel/plugin-proposal-private-property-in-object", { loose: true }],
"babel-plugin-jsx-control-statements",
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
Now I'm getting the following error:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/colelashley/waveterm/src/index.ts: .definitions is not a valid Plugin property
- Maybe you meant to use
"plugins": [
["babel-plugin-jsx-control-statements", {
"definitions": {
"process": "process/browser"
}
}]
]
To be a valid plugin, its name and options should be wrapped in a pair of brackets
I feel like it has something to do with using the wrong brackets or something like that Anyone know how I can fix this? Thanks