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

Add typescript files into webpack fileDependencies in transpileOnly mode? #783

Closed
MQuy opened this issue May 31, 2018 · 4 comments
Closed
Labels

Comments

@MQuy
Copy link

MQuy commented May 31, 2018

I am not sure this is the right place to ask this question. I will demonstrate with the example below

# demo.ts
export interface Demo {
  [key: string]: string
}
....
# index.ts
import { Demo } from './demo'

const demo: Demo = { "hello": "ts-loader" };

in my ts-loader config, if I don't enable transpileOnly, demo.ts file will be included in webpack fileDependencies (I assume it is from this part https://github.com/TypeStrong/ts-loader/blob/master/src/index.ts#L302), but if I enable transpileOnly, demo.ts won't be include in my webpack fileDependencies

I wonder is there an way that I can enable transpileOnly and demo.ts is still in webpack fileDependencies?

@johnnyreilly
Copy link
Member

I'm pretty sure the answer is "no". I think you've already noticed but there's essentially 2 modes of operation for ts-loader. transpileOnly or not. transpileOnly doesn't register file dependencies. I'm not sure if it can anyway because of the exposed API it is using. Do feel free to have a play and report back!

@MQuy
Copy link
Author

MQuy commented May 31, 2018

thanks, I actually played around with ts-loader but cannot find a way to make it work :(

@stale
Copy link

stale bot commented Jan 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 19, 2019
@stale
Copy link

stale bot commented Jan 26, 2019

Closing as stale. Please reopen if you'd like to work on this further.

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

No branches or pull requests

2 participants