I am running into an issue with object destructuring not working in a react component property.
I am getting Unexpected token (172:13)
at:
170 | }),
171 | }}
> 172 | items={...sideNavigationSectionItems}
| ^
173 | />
174 | );
175 | }
But my babel config should be covering this scenario?
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: '3.25',
bugfixes: false,
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
regenerator: true,
},
],
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-destructuring',
'@babel/plugin-transform-spread',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-classes',
],
I am stuck so any help would be greatly appreciated.
Marcus