Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: React output target 0.7.1 update #491

Open
3 tasks done
venkatesh-nagineni opened this issue Oct 8, 2024 · 4 comments
Open
3 tasks done

bug: React output target 0.7.1 update #491

venkatesh-nagineni opened this issue Oct 8, 2024 · 4 comments
Labels
help wanted a good issue for the community type: bug Something isn't working

Comments

@venkatesh-nagineni
Copy link

Prerequisites

Stencil Version

4.22

Stencil Framework Output Target

React

Stencil Framework Output Target Version

0.7.1

Current Behavior

As i updated react-output-target from 0.5.3 to 0.7.1, observed some changes especially how they get bundled with dist-custom-elements

what i have it in my stencil.config.ts with output target like

    {
        type: 'dist-custom-elements',
        customElementsExportBehavior: 'auto-define-custom-elements',
        externalRuntime: false,        
     },

after build with new react wrapper version, everything works as expected and running smoothly but vite bundler gives this warning as it bundles all components in one chunk and no tree shaking possible

As i only using single button component but it get's bundled everything

Screenshot 2024-10-08 at 11 28 58

Screenshot 2024-10-08 at 11 29 28

if i remove customElementsExportBehavior: 'auto-define-custom-elements', then i do not see chunk size exceed warning but it loads all components even i use single button component

Screenshot 2024-10-08 at 10 13 51

not sure what this update fix or did i make any wrong configuration

Expected Behavior

should work better with tree shaking and would be nice to provide any example how ionic handle this with example app via github

Steps to Reproduce

followed similar approach

https://github.com/yunker1/stencil-react-integration/tree/main/packages

Code Reproduction URL

https://github.com/yunker1/stencil-react-integration/tree/main/packages

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 8, 2024
Copy link

ionitron-bot bot commented Oct 8, 2024

Thanks for the issue!

This project is currently maintained for the purposes of supporting Ionic Framework. At this time, only new issues & pull requests that support Ionic Framework will be prioritized. For the latest updates regarding the maintenance status of this project, please see this section of the project's README

@christian-bromann christian-bromann added type: bug Something isn't working help wanted a good issue for the community and removed triage labels Oct 14, 2024
Copy link

ionitron-bot bot commented Oct 14, 2024

This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.

If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
Thank you!

@AdrianDorneanu
Copy link

Hi @venkatesh-nagineni . Do you have any update on this ? I'm currently facing the same issue.

@roboncode
Copy link

Same problem. was working, updated and now it no longer works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted a good issue for the community type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants