We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This example works in electron, but it's broken when I open localhost:8888/home in browser. I see the following error in devtools console:
ReferenceError: Can't find variable: require
The text was updated successfully, but these errors were encountered:
Hi @jerrygreen ! Thank you for your question.
Because NEXT's webpack config is optimized for electron like this:
// renderer/next.config.js module.exports = { webpack: (config) => Object.assign(config, { target: 'electron-renderer', }), };
So if you open the Chrome browser, you will get that errors because electron's browser is Chromium.
If you want to debug renderer (web) process in your browser, we must change next.config.js:
next.config.js
module.exports = { webpack: (config) => Object.assign(config, { // but this is not performant for Electron's browser target: 'web', }), };
Sorry, something went wrong.
@saltyshiomix huh, just checked it, it indeed works. So it's a question of optimization... Thank you for your feedback!
No branches or pull requests
This example works in electron, but it's broken when I open localhost:8888/home in browser. I see the following error in devtools console:
The text was updated successfully, but these errors were encountered: