We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@farmfe/js-plugin-dts
d.ts
1 parent 452ab57 commit 6453a7fCopy full SHA for 6453a7f
.changeset/slimy-banks-press.md
@@ -0,0 +1,5 @@
1
+---
2
+"@farmfe/js-plugin-dts": patch
3
4
+
5
+fix dts file creation
js-plugins/dts/src/context.ts
@@ -158,9 +158,15 @@ export default class Context {
158
service
159
.getEmitOutput(sourceFile, true)
160
.getOutputFiles()
161
- .filter((outputFile) =>
162
- outputFile.compilerObject.name.startsWith(this.options.root)
163
- )
+ .filter((outputFile) => {
+ const outputPath = outputFile.compilerObject.name.replace(
+ /\\/g,
164
+ '/'
165
+ );
166
+ const rootPath = this.options.root.replace(/\\/g, '/');
167
168
+ return outputPath.startsWith(rootPath);
169
+ })
170
.map((outputFile) => ({
171
path: resolve(
172
this.options.root,
0 commit comments