question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use Nest.js & TypeORM with Webpack HMR ?

See original GitHub issue

I’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()
  })
}

wx20180518-180518

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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
kamilmysliwieccommented, May 25, 2018

In latest @nestjs/typeorm@3.1.0 the keepConnectionAlive option is available. Set it to true in order to reuse the same connection between rebuilds. I’ll update the docs soon

1reaction
kamilmysliwieccommented, May 23, 2018

I’ll extend @nestjs/typeorm with keepConnection (or similar one) option in order to avoid reconnecting between successive compilations.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found