LinusBorg / portal-vue

A feature-rich Portal Plugin for Vue 3, for rendering DOM outside of a component, anywhere in your app or the entire document. (Vue 2 version: v2.portal-vue.linusb.org)
http://portal-vue.linusb.org
MIT License
3.9k stars 187 forks source link

targetSlim behaves inconsistently in `portal-vue.esm.js` and `portal-vue.common.js` #387

Closed devilwjp closed 1 year ago

devilwjp commented 1 year ago

version: 2.1.7 Setting targetSlim to true in portal-vue.esm.js is valid, but setting targetSlim to true in portal-vue.common.js will fail to render

LinusBorg commented 1 year ago

Please provide a runnable reproduction allowing me to reproduce the problem you are seeing. Thanks.

devilwjp commented 1 year ago

@LinusBorg The problem has been found. In the latest react project created by create-react-app, I want to create a vue application and use the esmodule specification to import portal-vue, but it will be mapped to portal-vue.common.js instead of Not portal-vue.esm.js, but portal-vue.common.js will require vue.common.js, and my project will use the esmodule specification to import vue, resulting in multiple instances of vue in the project.