https://pulumi.com logo
#getting-started
Title
# getting-started
s

stale-answer-34162

11/03/2023, 3:11 PM
do you ever have an issue with TS source code changes not being respected by the compiler and you need to run rm the dist folder frequently and or run
npm run build
a lot? what is your solution for that?
l

little-cartoon-10569

11/05/2023, 6:32 PM
This is all configured through package.json and tsconfig.json. If Pulumi is using dist/index.js instead of ./index.ts, it must be configured that way. Generally, you don't need a ./dist folder or to run tsc ever: by default, Pulumi's TS configuration uses ts-node and transpiles invisibly.
s

stale-answer-34162

11/06/2023, 1:30 AM
how does this look for my tsconfig? aiming for aws usage only.
Copy code
{
  "extends": "./tsconfig.build.json",
  "compilerOptions": {
    "rootDir": ".",
    "noEmit": true,
    "strict": true,
    "outDir": "dist",
    "target": "es2016",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "experimentalDecorators": true,
    "pretty": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "forceConsistentCasingInFileNames": true
  },
  "ts-node": {
    "swc": true
  },
  "include": [
    "."
  ],
  "exclude": [
    "node_modules",
    "dist"
  ],
  "files": [
    "src/index.ts"
  ]
}
l

little-cartoon-10569

11/06/2023, 2:41 AM
Looks fairly different to mine, but I can't see your tsconfig.build.json. I think you need compiler option
"declaaration": true
, and
noEmit
probably shouldn't be there (or should be
false
). It's probably a good idea to specify
"types": ["node"]
and whichever
lib
value you use.