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
Development process is slow with webpack, is there a way to use ts-node instead? #997
Comments
Qode and NodeGui don't really support hot code reloading, so either way you will have to restart the app. As for speeding up the dev process, do you realise that you don't need a bundler at all. You can compile to your TS code to JS files in a My project Extraterm had zero bundling for a long time, even during packaging. I only just recently started bundling the code to bring down the final package/installer sizes. I went for esbuild though which is very fast and takes a tiny fraction of time compared to the normal TS compile phase. You can see this set up here: https://github.com/sedwards2009/extraterm/blob/master/main/package.json |
@sedwards2009 Thank you so much for your quick reply! I will checkout your setup. I still think there should be a way to use ts-node, which is by far my preferred way of running TypeScript, it's super fast since it doesn't write/compile files and feels cleaner. |
For what it's worth I use esbuild before running qobe and it works well and is super fast to the point that I don't notice it. Might want to give that a try. I did have to tell esbuild to use external packages and to explicitly exclude all my node_modules dependencies, but totally reasonable and it's possible there are better ways (also I'm using ESM modules everywhere but dependencies are commonjs which is why I needed to do this weird dance I think). For what it's worth this is waaay faster than ts-node. Tsx is typically faster because it uses esbuild under the hood which is much much faster than tsc. |
I've spent some time this week on a new starter project. The basics are in place and you can have a look at it here: https://github.com/sedwards2009/nodegui-simple-starter |
I love nodegui and been using it for months now. One thing that would vastly improve the developer experience is not waiting for compilation every time the code changes. ts-node seems like the perfect solution for this problem, it allows TypeScript code to run pretty much on the fly. Here's a TypeScript starter project for reference.
Is it possible to integrate qode and ts-node and not have to deal with webpack at all? It'd make for a much simpler nodegui starter project.
Thank you!
The text was updated successfully, but these errors were encountered: