You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
I am using HappyPack in combination with ts-loader. When I use webpack in watch mode, I noticed that webpack may produce different results between the first build and the second build (triggered by watch mode when a file is saved/changed).
In the README.md I have outlined some steps to reproduce this behaviour.
It seems the reason for this is that ts-loader is picking a using config file in the second build.
Immediately before the first build we see this logged:
ts-loader: Using typescript@3.9.3 and /Users/oliverash/Development/webpack-happypack-ts-loader-bug/tsconfig.json
Immediately before the second build we see this logged:
ts-loader: Using typescript@3.9.3 and /Users/oliverash/Development/webpack-happypack-ts-loader-bug/shared/tsconfig.json
Notice how the tsconfig.json path is different!
ts-loader is supposed to derive the tsconfig.json path from the "entry file", but in the second build it seems to be deriving it from the file which changed (which isn't an entry point).
At first I thought this was an issue with ts-loader, but I can only reproduce this when I'm also using HappyPack.
In case it helps others, I am able to workaround it by specifying an explicit configFile in the ts-loader options.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using HappyPack in combination with
ts-loader
. When I use webpack in watch mode, I noticed that webpack may produce different results between the first build and the second build (triggered by watch mode when a file is saved/changed).This was very surprising to me, so I created a reduced test case: https://github.com/OliverJAsh/webpack-happypack-ts-loader-bug
In the
README.md
I have outlined some steps to reproduce this behaviour.It seems the reason for this is that
ts-loader
is picking a using config file in the second build.Immediately before the first build we see this logged:
Immediately before the second build we see this logged:
Notice how the
tsconfig.json
path is different!ts-loader
is supposed to derive thetsconfig.json
path from the "entry file", but in the second build it seems to be deriving it from the file which changed (which isn't an entry point).At first I thought this was an issue with
ts-loader
, but I can only reproduce this when I'm also using HappyPack.In case it helps others, I am able to workaround it by specifying an explicit
configFile
in thets-loader
options.The text was updated successfully, but these errors were encountered: