Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch flag not picking up newly added (and built) files #161

Open
cerpins opened this issue Mar 10, 2023 · 1 comment
Open

watch flag not picking up newly added (and built) files #161

cerpins opened this issue Mar 10, 2023 · 1 comment

Comments

@cerpins
Copy link

cerpins commented Mar 10, 2023

Hi, when running with watch flag as described in docs ("build:watch": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")"), adding a new file does not get picked up by tsc-alias.

My tsconfig:

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "outDir": "app",
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "react-jsx",
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "inlineSources": true,
    "noEmit": true,
    "baseUrl": "./src"
  },
  "include": ["src"],
  "exclude": ["./app", "./node_modules"],
  "files": ["./src/index.ts"]
}

Is there any way to fix this via configuration?

@cerpins
Copy link
Author

cerpins commented Mar 10, 2023

After encountering overall instability with the --watch flag, I've decided to opt for running tsc-alias with nodemon. Feel free to close ticket if satisfactory. I think it would also be helpful to note this in the documentation as a potential approach.

yarn nodemon --exec 'yarn tsc-alias' --watch app/**/*.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant