-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix: make disable default style env variable work for client side bundler and nextjs #787
fix: make disable default style env variable work for client side bundler and nextjs #787
Conversation
@Jokcy is attempting to deploy a commit to the CodeSandbox Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c95a960:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey, @Jokcy! Thanks for opening this PR. But I didn't get why we need to make these changes to work on Nextjs Could you highlight what's the current issue and how it solves it? Edit: just saw your another comment on the issue, but I still can't understand what's the difference |
@Jokcy I updated your sandbox using another approach and it worked as expected, check the |
It will work if you use Also I'm not sure if the |
CodeSandbox is down now, we're taking a look what's going on. Thanks |
@danilowoz I tried with vite, define variable in vite.config.js export default defineConfig({
plugins: [react()],
define: {
"process.env.SANDPACK_BARE_COMPONENTS": "true",
},
}); It worked at dev mode because on dev mode vite will actually add an So not matter if we add |
Got it! It makes sense. Could you please update the documentation with the new env var you introduced? And then, let's get this merged |
@danilowoz done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
This breaks on vite react now with https://codesandbox.io/p/sandbox/vite-react-sandpack-tqef1u?file=%2FREADME.md |
What kind of change does this pull request introduce?
Make
SANDPACK_BARE_COMPONENTS
work for client bundler, and add Nextjs support.close #713
What is the current behavior?
Not work for nextjs
What is the new behavior?
work for nextjs
Checklist