Bug: sandpack-react: Duplicate entry points
See original GitHub issueIssue Description
FIrst of all - thank you for nice tool! I’m really happy to use it in my projects 🙌
Bug report
- This setup gives 2 tabs with same title
App.tsx
, and renders default template in preview, instead of myApp.tsx
<Sandpack
template="react-ts"
files={{
"/App.tsx": code
}}
/>
- This setup gives no tabs, but nothing renders in preview
<Sandpack
template="react-ts"
files={{
"/App.tsx": code
}}
customSetup={{ entry: "/App.tsx", main: "/App.tsx" }}
/>
Expected:
- no tabs
- preview renders my provided example
You can try it in sandbox https://codesandbox.io/s/sandpack-codesandbox-rendering-conflict-forked-hfuip
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Build an interactive blog with React and Sandpack
With Sandpack's interactive code samples, you can take your blog to the next level. Learn how to implement them in this detailed post....
Read more >ESM dependencies are not resolved correctly during build
06:04:41 AM [build] Building static entrypoints. ... I ran into this problem with the @codesandbox/sandpack-react package.
Read more >Getting problem with duplicate items in the cart in React.js
First, if you want the user to be able to select up to 4 products, you should change handleAddToCart 's if statement, change...
Read more >Ammunition and Explosives Safety Standards
Storage at the ammunition supply points and ammunition transfer points ... (b) A single entrance with double doors, both doors must be ajar....
Read more >@codesandbox/sandpack-client - npm
sandpack -client. A bundler that completely works in the browser and takes advantage of it. Why? Online code playgrounds are getting more ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@danilowoz, the template of
react
andreact-ts
is different, which is confusing sometimes. I think it’s better to unify the format of these 2 react templates.It has been addressed on https://github.com/codesandbox/sandpack/pull/268, please let me know if I covered all topics/problems mentioned here.
Thanks for raising up this issue.