When using vite and vitest with @ag-grid-community. I keep gettings the following errors
SyntaxError: Cannot use import statement outside a module
❯ Object.compileFunction ../../../../../../../../../../../../node:vm:352:18
❯ ../../node_modules/@ag-grid-community/vue/main.js:6:10
@ag-grid-community\vue\lib\AgGridVue.js:8 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
Within vitest setup i've tried adding ag-grid to the dependencies inline, however this does not resolve the issue.
test: {
deps: {
inline: ['@ag-grid-community/vue/lib/AgGridVue']
}
}
Is there a way to correctly ignore this within vitest, or adding ESM support to @ag-grid-community/vue/AgGridVue?
When using vite and vitest with @ag-grid-community. I keep gettings the following errors
Within vitest setup i've tried adding ag-grid to the dependencies inline, however this does not resolve the issue.
Is there a way to correctly ignore this within vitest, or adding ESM support to @ag-grid-community/vue/AgGridVue?