0

I'm trying to improve nodemon server/start speed.

my script command in package.json is

installed npm install --save-dev ts-node @swc/core @swc/helpers regenerator-runtime

scripts: {
        "dev": "nodemon --watch src server.ts"
    }

and tsconfig.json is

{
  "compilerOptions": {
    "baseUrl": ".",
    "target": "ES6",
    "module": "commonjs",
    "removeComments": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "types": [
      "node",
      "bytebuffer"
    ],
    "moduleResolution": "node",
    "pretty": true,
    "sourceMap": true,
    "skipLibCheck": true,
    "suppressImplicitAnyIndexErrors": true,
    // "noImplicitAny": false,
    "resolveJsonModule": true,
    "outDir": "./build",
    "typeRoots": [
      "./src/interfaces/index.d.ts",
      "node_modules/@types"
    ],
    "paths": {
      "@config/*": [
        "./src/config/*"
      ],
      "@controllers/*": [
        "./src/controllers/*"
      ],
      "@dao/*": [
        "./src/dao/*"
      ],
      "@json/*": [
        "./src/json/*"
      ],
      "@lib/*": [
        "./src/lib/*"
      ],
      "@mappers/*": [
        "./src/mappers/*"
      ],
      "@models/*": [
        "./src/models/*"
      ],
      "@plugins/*": [
        "./src/plugins/*"
      ],
      "@routes/*": [
        "./src/routes/*"
      ],
      "@utils/*": [
        "./src/utils/*"
      ]
    }
  },
  "ts-node": {
    "swc": true
  },
  "filesGlob": [
    "./src/**/*.ts"
  ],
  "exclude": [
    "node_modules",
    "src/lib/customTypings"
  ]
}

and mainly also mentioned in tsconfig.json file

ts-node: {
    "swc": true
  }

after Configuring all the steps still nodemon server taking 2 min to restart after changes.

Are there any changes that need to do to the current setup? and I followed this question

I did all the changes still it is not effect in speed of compile

ram
  • 11
  • 4

0 Answers0