nestjs / typeorm

TypeORM module for Nest framework (node.js) 🍇

Home Page:https://nestjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding ormconfig to project changes build output in dist directory

conspireagency opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

After adding an ormconfig to a project it changes the build output in the dist directory.

Prior the project would output directly to the root of the dist folder.

Now when build occurs the ormconfig related files live in the root of the dist folder while the rest of the build is placed in the src subfolder of dist.

Minimum reproduction code

https://docs.nestjs.com/techniques/database

Steps to reproduce

Add ormconfig to a project and run a nest build. Compare output before + after.

Expected behavior

Ideally the build output wouldn't change or could be defined so that build output is the same. We've experienced that this breaks deployments.

Package version

7.1.0

NestJS version

7.0.0

Node.js version

12

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

This will be true if you use ormconfig.ts. If it is a js file, the dist structure will not change (assuming you never import the js file). This is how Typescript works to ensure the dist directory has the same file import paths

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.