quasarframework / quasar-testing

Testing Harness App Extensions for the Quasar Framework 2.0+
https://testing.quasar.dev
MIT License
180 stars 65 forks source link

Webpack Compilation Error. You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. #276

Closed khteh closed 2 years ago

khteh commented 2 years ago

test/cypress/integration/pages/MyPage.cy.js:

import MyPage from '../../../../src/pages/MyPage.vue';

Running E2E test bumps into the following error:

Webpack Compilation Error
./src/pages/MyPage.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <template>
|   <q-page padding>
|     <q-input
 @ ./test/cypress/integration/pages/MyPage.cy.js 9:40-86

What do I miss? Thanks.

Software version

OS: Ubuntu 22.04 Node: NPM: Any other software related to your bug:

What did you get as the error?

What were you expecting?

What steps did you take, to get the error?

khteh commented 2 years ago

vue-loader.vuejs.org/guide/#vue-cli

khteh commented 2 years ago

I have added the webpacl.config.js at the root of the source tree but to no avail. Same error.

IlCallo commented 2 years ago

Are you using Cypress 10? We're still working to support it, it currently won't work, check out https://github.com/quasarframework/quasar-testing/pull/259

khteh commented 2 years ago

"cypress": "^10.4.0"

IlCallo commented 2 years ago

Follow #259 to know when we'll support Cypress 10