You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module C:/WorkProjects/Ste-App-Client-2/node_modules/echarts/core.js:20 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "echarts" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
Version
^5.4.3
Link to Minimal Reproduction
Visual Studio Code
Steps to Reproduce
Good time! Guys, importing charts "knocks down" tests written on vitest:
SyntaxError: Unexpected token 'export'
Although the recommended setting is written in my config...
Current Behavior
Module C:/WorkProjects/Ste-App-Client-2/node_modules/echarts/core.js:20 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "echarts" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
// vitest.config.js
export default {
test: {
server: {
deps: {
inline: [
"echarts"
]
}
}
}
}
Expected Behavior
No errors
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: