Skip to content

Commit 36c6814

Browse files
committed
Added correct relative path
1 parent d8096aa commit 36c6814

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

src/after-compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function provideDeclarationFilesToWebpack(
251251

252252
declarationFiles.forEach(declarationFile => {
253253
const assetPath = path.relative(
254-
compilation.compiler.context,
254+
compilation.compiler.outputPath,
255255
declarationFile.name
256256
);
257257
compilation.assets[assetPath] = {

src/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export interface WebpackCompilation {
149149
export interface WebpackCompiler {
150150
isChild(): boolean;
151151
context: string; // a guess
152+
outputPath: string;
152153
watchFileSystem: WebpackNodeWatchFileSystem;
153154
/** key is filepath and value is Date as a number */
154155
fileTimestamps: Map<string, number>;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Asset Size Chunks Chunk Names
2-
bundle.js 5.13 KiB main [emitted] main
3-
app.d.ts 110 bytes [emitted]
4-
sub/dep.d.ts 63 bytes [emitted]
1+
Asset Size Chunks Chunk Names
2+
bundle.js 5.13 KiB main [emitted] main
3+
../types/app.d.ts 110 bytes [emitted]
4+
../types/sub/dep.d.ts 63 bytes [emitted]
55
Entrypoint main = bundle.js
66
[./app.ts] 910 bytes {main} [built]
77
[./sub/dep.ts] 182 bytes {main} [built]
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3-
"declaration": true
3+
"declaration": true,
4+
"declarationDir": "types"
45
}
56
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Asset Size Chunks Chunk Names
2-
bundle.js 5.13 KiB main [emitted] main
3-
app.d.ts.map 194 bytes [emitted]
4-
app.d.ts 143 bytes [emitted]
5-
sub/dep.d.ts.map 142 bytes [emitted]
6-
sub/dep.d.ts 96 bytes [emitted]
1+
Asset Size Chunks Chunk Names
2+
bundle.js 5.13 KiB main [emitted] main
3+
../types/app.d.ts.map 197 bytes [emitted]
4+
../types/app.d.ts 143 bytes [emitted]
5+
../types/sub/dep.d.ts.map 152 bytes [emitted]
6+
../types/sub/dep.d.ts 96 bytes [emitted]
77
Entrypoint main = bundle.js
88
[./app.ts] 910 bytes {main} [built]
99
[./sub/dep.ts] 182 bytes {main} [built]
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"declaration": true,
4-
"declarationMap": true
4+
"declarationMap": true,
5+
"declarationDir": "types"
56
}
67
}

0 commit comments

Comments
 (0)