Is it possible to enable esm when using Gulp to build the TypeScript project

21 views Asked by At

I am using Gulp to build the project like this:

gulp build

I want to enable the ts-node esm, so I add the configuration in tsconfig.json like this:

"ts-node": {
    "esm": true
  },

When I rerun the build command, it seems Gulp did not read the tsconfig.json esm configuration. What should I do to enable the esm when using Gulp to build the project? This is the Gulp version:

> gulp -v
CLI version: 2.3.0
Local version: 4.0.2

This is the full config of tsconfig.json:

{
  "extends": "./tsconfig.build.json",
  "compilerOptions": {
    "module": "commonjs",
    "rootDir": ".",
    "allowJs": true
  },
  "ts-node": {
    "esm": true
  },
  "include": ["src", "tests", "third_party"]
}
0

There are 0 answers