I'm getting the following:
babel.config.json:
{
"presets": [
["@babel/preset-env", { "targets": { "esmodules": true } }],
["@babel/preset-react", { "runtime": "automatic" }]
]
}
jest.config.js:
export default {
testEnvironment: 'jest-environment-jsdom',
};
I have "type": "module"
set in the package.json
query-string version is 9.0.0
& using Vite
What triggers the error is the rendering of the <PublicRoute />
component:
render(
<AuthContext.Provider value={contextValue}>
<PublicRoute>
<h1>Test</h1>
</PublicRoute>
</AuthContext.Provider>
);
Checked the following query-string Github thread but no luck.
Ideally, I'd prefer a solution for query-string v9 or latest, if anyone has it.
Having said that, downgrading to v7 solved it.