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

webpack --watch ignores certain files when ts-loader with transpileOnly is used #591

Closed
ptkoz opened this issue Jul 27, 2017 · 2 comments
Closed

Comments

@ptkoz
Copy link

ptkoz commented Jul 27, 2017

When using configuration mentioned in Faster Builds section of Readme.md (with fork-ts-checker-webpack-plugin and transpileOnly set to true), webpack is unable to watch .ts files those do not produce any .js output (e.g. with interface definition only).

Consider following fancy-interface.ts file:

export interface FancyInterface {
	test(): void;
}

If you run webpack --watch, modifications in this file are ignored, as webpack is not triggering rebuild. With transpileOnly: false everything works like expected.

I've made a small repo based on "fork-ts-checker" example to isolate the problem. Steps to reproduce:

  1. git clone https://github.com/pamelus/ts-loader-transpileOnly-watch
  2. cd ts-loader-transpileOnly-watch && npm install
  3. npm run start
  4. Make some changes in src/fancy-interface.ts. Observe that webpack is not triggering rebuild.

I don't know either it is intentional or not, but I think it deserves at least small mention in Readme.md. Or a fix.

Test case created using:

@johnnyreilly
Copy link
Member

Yes - this is an issue with the fork checker, you can track it here: TypeStrong/fork-ts-checker-webpack-plugin#36

Agreed it would be good to mention it in the readme - if you'd like to submit a PR I'll take a look.

@johnnyreilly
Copy link
Member

I've raised a docs PR for the fork checker here

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

2 participants