Subscribe on changes!

[vue/compat] createApp copy singletonApp configs even set { mode:3 } to compatConfig

avatar
Apr 11th 2022

Version

3.2.31

Reproduction link

github.com

Steps to reproduce

run yarn dev, see main.ts and see console output, compare two app's config.globalProperties.

I'm not very sure whether it's a bug or I used it wrong. I read a little code from createApp to applySingletonAppMutations roughly, I didn't find config to turn this behavior off.

What is expected?

{mode: 3} shouldn't copy app configs to another.

What is actually happening?

createApp copied app configs.

avatar
May 22nd 2022

+1 on this. I have a minimal repro codesandbox as well. the two apps created with createApp share components, directives, and mixins, even on configureCompat({ MODE: 3 }) which I would expect to be 100% identical to running without the compat build at all.