-
-
Notifications
You must be signed in to change notification settings - Fork 245
Thoughts on "isolatedModules": true and ts-loader #17
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
Comments
Hi! :) |
Sure - as soon as I get a moment I'll take a look! |
Released with 0.2.2 ;) |
Sweet! |
What does |
@odensc - meant to work together. See the readme of ts-loader for |
Ah, thanks. I updated to ERROR at /home/oden/Dev/JS/fttv/node_modules/@types/babel-core/index.d.ts(16,19):
TS1205: Cannot re-export a type when the '--isolatedModules' flag is provided. If |
No you shouldn't ... that's odd. Suggests that my change is not working? You definitely have |
This may be relevant: microsoft/TypeScript#2812 Giving it a brief read I'm wondering if there's a problem using |
Yes - It seems the change was made in microsoft/TypeScript#15538. I'm actually running Still, none of this should be an issue if |
Question: do you get the same error if instead of using |
@johnnyreilly Same error with |
OK - we've ruled out ts-loader at least which is good. Let's see if @piotr-oles can provide any clues when he comes online. I've raised an issue with the typescript repo to get guidance. |
OK - the issue is actually in the TypeScript compiler. Also, it turns out that my understanding of The change in my PR doesn't really add much of use; although it arguably does no no harm since there's no reason you'd ever want to run fork-ts-checker-webpack-plugin with Either way; my apologies for wasting your time on this one. Not my intention. |
No problem, at least I know what it does now. :) |
@johnnyreilly Yes, I think it would be good to revert this changes :) One place less to introduce weird bugs in the future :) |
Hey!
An idea just occurred to me which might improve performance still when using this plugin with ts-loader.
I've just been pondering usage of
"isolatedModules": true,
in relation to using ts-loader alongside fork-ts-checker-webpack-plugin. Essentially using this option will speed up compilation times. Which is nice.However, if we set this option in the tsconfig.json then presumably fork-ts-checker-webpack-plugin will be impacted by this and effectively cease to typecheck. So that's not good.
Would you consider / would it make sense to have fork-ts-checker-webpack-plugin set
isolatedModules
tofalse
regardless of what it says in thetsconfig.json
? If that were the case then we could advise people using ts-loader with fork-ts-checker-webpack-plugin to use"isolatedModules": true,
in theirtsconfig.json
for an extra perf boost.What do you think?
cc @jamesbrantly
PS this is a badly documented compiler flag - there's a nice blog post on it though: http://weblogs.thinktecture.com/thomas/2016/05/tired-of-waiting-for-typescript-compilation.html
The text was updated successfully, but these errors were encountered: