Vue-Warning: Cypress 10 with vue 3.2 and webpack 5.73 - CompilerOptions-Warning
See original GitHub issueCurrent behavior
If i mount a vue-3-component
// support/component.js
import { mount } from 'cypress/vue';
...
// cypress/component/my-component.cy.js
import myComponent from '@/My-Component.vue';
...
cy.mount(myComponent);
I get a vue-warning:
warn("[Vue warn]: The compilerOptions config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, compilerOptions must be passed to @vue/compiler-dom in the build setup instead.\n- For vue-loader: pass it via vue-loader's compilerOptions loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom")
I have researched on this in the code and found out that it happens when mounting the app in cypress-vue
// cypress-vue.esm-bundler.js
function mount$1(inputComponent, options) {
...
// create the app
...
// AppConfig
...
app.config[k] = v; // <-- here it fails cause accessing app.config.compilerOptions
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting Started with Cypress Component Testing (Vue 2/3)
Configuring The Cypress Component Test Runner. Once you've got a Vue project, you'll also need to install Cypress and the Webpack Dev Server...
Read more >Webpack error during vuejs with cypress for e2e test
This problem is a webpack error. The error occurs after import a thirdy package. My cypress test: import { faker } from '@faker-js/faker';...
Read more >@cypress/vue - npm
Start using @cypress/vue in your project by running `npm i @cypress/vue`. There are 4 other projects in the npm registry using @cypress/vue.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marktnoonan: Important to get the Error is to “cy.stub” window.console like below. With that we want to fail every test when the console throws a warning
Here are an excerpt from my package.json with all installed exact versions. I still get the Warning
Confirmed this can be found to be logged even our own tests, like
packages/launchpad/src/setup/OpenBrowserList.cy.tsx
, so this is good to go for the team to pick up.It looks like we can avoid this by not using the
runtime-only
build (https://vuejs.org/guide/scaling-up/tooling.html#project-scaffolding) or by changing how we passcompilerOptions
.