Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit c05e296

Browse files
authored
Merge pull request #442 from LayfonWeller/patch-1
Change the context to webpack provided one
2 parents 40a7621 + 2ddc46e commit c05e296

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/instance.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface Loader {
4343
emitFile: (fileName: string, text: string) => void;
4444
emitWarning: (msg: string) => void;
4545
emitError: (msg: string) => void;
46+
context: string;
4647
options: {
4748
ts?: LoaderConfig
4849
};
@@ -87,7 +88,7 @@ export function ensureInstance(
8788
}
8889

8990
const watching = isWatching(rootCompiler);
90-
const context = process.cwd();
91+
const context = webpack.context || process.cwd ();
9192

9293
let compilerInfo = setupTs(query.compiler);
9394
let { tsImpl } = compilerInfo;

0 commit comments

Comments
 (0)