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

chore(next): add routing #51

Closed
wants to merge 5 commits into from
Closed

chore(next): add routing #51

wants to merge 5 commits into from

Conversation

ayushmanchhabra
Copy link
Contributor

@ayushmanchhabra ayushmanchhabra commented Jan 21, 2024

Description of Changes

  • Remove ./hooks workaround
  • Add Next.js routing
  • Call nw.require during dev mode
  • Call nw.require after building app

Fixes: #1

<li>Chromium: {nw.require('process').version['chromium']}</li>
<li>Node.js: {nw.require('process').version['node']}</li>
<li>V8: {nw.require('process').version['v8']}</li>
<li>NW.js: {nw && nw.require('node:process').versions['nw']}</li>
Copy link
Contributor Author

@ayushmanchhabra ayushmanchhabra Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During development, this works fine. But after building web app, the code after nw && is stripped out by the compiler. Ideally, we don't want this to happen. Maybe the way is to not bundle and minify web apps and run them as is?

@ayushmanchhabra
Copy link
Contributor Author

ayushmanchhabra commented Feb 18, 2024

Will have to research and figure out how to call nw in Next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to run node.js code and/or next.js api routes?
1 participant