Subscribe on changes!

compatconfig per component not working as expected

avatar
Jun 29th 2023

Vue version

vue@3.3.4

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-dmdsf6?file=src%2Fcomponents%2FHelloWorld.vue

Steps to reproduce

Check the vite.config.js - the MODE is set to compatConfig to 3 Check the HelloWorld vue:

  compatConfig: {
    MODE: 2,
    FILTERS: true,
  },

it has set MODE to 2 so using filters should work correctly. Look at the page, it doesnt.

image

What is expected?

https://v3-migration.vuejs.org/migration-build.html#per-component-config

Since compatConfig on the component is HelloWorld.vue is set to 2 I would have expected to see the filter working. Additionally FILTERS is set to true, so even if using MODE 3 in vite.config.js I would have expected the per-component configuration to work.

What is actually happening?

Filter is not working in spite of per-component-config

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.6.3 - /usr/local/bin/pnpm
  npmPackages:
    vue: ^3.3.4 => 3.3.4

Any additional comments?

I tried per-component-config using different vue/vue-compat and vite versions but could never make it work ...