Skip to content

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

Closed

Description

@MQuy

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?

Activity

  1. johnnyreilly commented on May 31, 2018

    @johnnyreilly
    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!

  2. MQuy commented on May 31, 2018

    @MQuy
    Author

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

  3. stale commented on Jan 19, 2019

    @stale

    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.

  4. stale commented on Jan 26, 2019

    @stale

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions