skip to Main Content

Error 'Cannot use import statement outside a module ' while testing in Vite – Reactjs

I am working in a Vite project, my goal is to be able to write tests. So I setup Jest and Babel and write a test, but I'm getting an error like this: C:UsersjoaovOneDriveDev ProjetosProjetos pessoaiscsgo-e-commercenode_modulesfirebaseappdistindex.esm.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { registerVersion }…

VIEW QUESTION

Issue while configuring eslint – Reactjs

I am facing the following issues while adding new commit, I have project configured with eslint + husky + prettier + react + vite 1:1 error 'vite' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies 2:1 error '@vitejs/plugin-react-swc'…

VIEW QUESTION
Back To Top
Search