【example demo bug】Did not work as expected when using the sample demo
zhaoky opened this issue · comments
Steps to reproduce
- Pull the code from the main branch and install the dependency.
- Run the vue3-demo-esm example.
- The project started successfully, but some components did not load as expected.
![image](https://private-user-images.githubusercontent.com/10738770/308921183-7ef679b8-abd2-4373-b0bc-bc11c5319e8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NDEwNTIsIm5iZiI6MTcyNDU0MDc1MiwicGF0aCI6Ii8xMDczODc3MC8zMDg5MjExODMtN2VmNjc5YjgtYWJkMi00MzczLWIwYmMtYmMxMWM1MzE5ZThiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIzMDU1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0MjkyNTM1ZjJjNmRkOGIxNDU1Y2ExYmJjMTQ5NDRhNzg3YzZkNmNmMjIzM2IxNTU1NjQ2NzI0OTM5MDE1MGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.P7Sp95BX_2z2Ot9P-gNQZ9MIsqKEThQZh1Hj2gGRRnI)
Components in the red box are not rendered
What is Expected?
All components render normally.
What is actually happening?
Some components are not rendered.
![image](https://private-user-images.githubusercontent.com/10738770/308922783-49f45872-4f35-4582-8226-2b787303f722.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NDEwNTIsIm5iZiI6MTcyNDU0MDc1MiwicGF0aCI6Ii8xMDczODc3MC8zMDg5MjI3ODMtNDlmNDU4NzItNGYzNS00NTgyLTgyMjYtMmI3ODczMDNmNzIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIzMDU1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2N2JmZWFkNzZjOTM3NjFkZDA2MjdkMDJkMGFkZTUyOWJjNDYwMjBmZWY2ZWFiOGU1YTQzMjkwOWYxYTYyMGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1rS9qDA0mo1KzyuGlEUGzlD442LCsAczyJP9o8GTyuk)
Whether the remote component's module is asynchronously fetched, causing the ‘default‘ to be undefined?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
It's because of shards. Button and Content use pinia. Requesting pinai is a promise, and the first accessed component defalut will be undefind.
It's because of shards. Button and Content use pinia. Requesting pinai is a promise, and the first accessed component defalut will be undefind.
const dynamicComponents = ['Button','Images','Content'];
If the Content is placed after the Button, the Button will be undefined.
Although I have found the problem, I still don't know how to configure it. I am still researching. Have you taken care of it?