Git Product home page Git Product logo

nest-nx-swc's Introduction

Nestjs + SWC + NX

setup:

  • run pnpm i in the root directory
  • have nx installed globally via npm i -g nx@latest

running:

  • run nx run monolith:watch this will trigger the script watch in the package.json at /services/monolith/package.json

tsconfig flow:

  • base tsconfig: tsconfig.base.json
  • base tsconfig.json: extends tsconfig.base.json
  • project level services/monolith/tsconfig.json extends base-level tsconfig.base.json
  • project level services/monolith/tsconfig.base.json extends project level services/monolith/tsconfig.base.json

expected behaviour

SWC bundles the code at libs/config and libs/database etc. together with the project source code at services/monolith/src

observed behaviour:

SWC throws cannot find module '../../../libs/config/config.module' with the compiled files in dist referencing these as a relative import to the TS source code.


with webpack, it would be the case that the whole code would get compiled into the final artifact inside dist without needing to build libraries separately.

nest-nx-swc's People

Contributors

sebastiangug avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.