-
Notifications
You must be signed in to change notification settings - Fork 603
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
Exporting with app.mount should work in browser #650
Comments
This happens because bankai tries to server render when you do |
Hmm maybe in Bankai we can use https://www.npmjs.com/package/globals to check if an error message is for an undefined browser global and show a more helpful message about SSR. |
idk, for me ssr has been a headache since it arrives to bankai. It is not always needed and it is actually breaking very basic stuff. For now, I just opted for avoid |
Expected behavior
module.exports = app.mount('body')
should work on the browser, with browsers APIsActual behavior
Using fetch ends up in
fetch is not defined error
which dissappears when I changemodule.exports = app.mount('body')
withapp.mount('body')
Steps to reproduce behavior
Run
npx create-choo-app some-app
and replace the main view withThen run
npm start
and it will throw something likeThe text was updated successfully, but these errors were encountered: