How to use Nest.js & TypeORM with Webpack HMR ?
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
if (module['hot']) {
module['hot'].accept()
module['hot'].dispose(() => {
app.close()
})
}
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
Nest version: 5.0.0
TypeORM version: 0.2.5
MySQL version: 2.15.0
For Tooling issues:
- Node version: 8.11.2
- Platform: Mac
Others:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Hot reload | NestJS - A progressive Node.js framework
To enable HMR, open the application entry file ( main.ts ) and add the following webpack-related instructions: declare const module: any; ...
Read more >Bundle a NestJS + TypeORM application (with webpack)
How to bundle nestjs application with webpack Seems to copy/paste a working solution from ZenSoftware without quoting. Links to another answer.
Read more >Nest.js & Webpack Hot Module Replacement - JT Earl - Medium
The quickest way to get HMR up and running is to follow along with the nest.js documentation. First, you will need to copy...
Read more >Hot Reload | NestJS 中文文档
If you are using the Nest CLI, the configuration process is pretty straightforward. The CLI wraps webpack , which allows use of the...
Read more >Setup Webpack HMR with NestJS and React - TypeScript TV
Programmatically setup a Nest.JS server with Webpack's Hot Module Replacement (HMR) to host a React web application. Setup. Setting up a NestJS server...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In latest
@nestjs/typeorm@3.1.0
thekeepConnectionAlive
option is available. Set it to true in order to reuse the same connection between rebuilds. I’ll update the docs soonI’ll extend
@nestjs/typeorm
withkeepConnection
(or similar one) option in order to avoid reconnecting between successive compilations.