vite-plugin-dts 3.5.3 → 3.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +368 -368
- package/README.zh-CN.md +368 -368
- package/dist/index.cjs +11 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +11 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -626,11 +626,17 @@ ${logPrefix} ${kolorist.yellow(
|
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
629
|
+
const computeGlobs = (rootGlobs, tsGlobs, defaultGlob) => {
|
|
630
|
+
if (rootGlobs?.length) {
|
|
631
|
+
return ensureArray(rootGlobs).map((glob) => normalizeGlob(ensureAbsolute(glob, root)));
|
|
632
|
+
}
|
|
633
|
+
return ensureArray(tsGlobs?.length ? tsGlobs : defaultGlob).map(
|
|
634
|
+
(glob) => normalizeGlob(ensureAbsolute(glob, configPath ? node_path.dirname(configPath) : root))
|
|
635
|
+
);
|
|
636
|
+
};
|
|
637
|
+
include = computeGlobs(options.include, content?.raw.include, "**/*");
|
|
638
|
+
exclude = computeGlobs(options.exclude, content?.raw.exclude, "node_modules/**");
|
|
639
|
+
filter = pluginutils.createFilter(include, exclude);
|
|
634
640
|
const rootNames = Object.values(entries).map((entry) => ensureAbsolute(entry, root)).concat(content?.fileNames.filter(filter) || []).map(normalizePath);
|
|
635
641
|
host = ts__default.createCompilerHost(compilerOptions, true);
|
|
636
642
|
program = vueTsc.createProgram({ host, rootNames, options: compilerOptions });
|
package/dist/index.d.ts
CHANGED
|
@@ -115,9 +115,9 @@ interface PluginOptions {
|
|
|
115
115
|
*/
|
|
116
116
|
staticImport?: boolean;
|
|
117
117
|
/**
|
|
118
|
-
* Override `include` glob
|
|
118
|
+
* Override `include` glob (relative to root)
|
|
119
119
|
*
|
|
120
|
-
* Defaults to `include` property of tsconfig.json
|
|
120
|
+
* Defaults to `include` property of tsconfig.json (relative to tsconfig.json located)
|
|
121
121
|
*/
|
|
122
122
|
include?: string | string[];
|
|
123
123
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -626,11 +626,17 @@ ${logPrefix} ${yellow(
|
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
629
|
+
const computeGlobs = (rootGlobs, tsGlobs, defaultGlob) => {
|
|
630
|
+
if (rootGlobs?.length) {
|
|
631
|
+
return ensureArray(rootGlobs).map((glob) => normalizeGlob(ensureAbsolute(glob, root)));
|
|
632
|
+
}
|
|
633
|
+
return ensureArray(tsGlobs?.length ? tsGlobs : defaultGlob).map(
|
|
634
|
+
(glob) => normalizeGlob(ensureAbsolute(glob, configPath ? dirname(configPath) : root))
|
|
635
|
+
);
|
|
636
|
+
};
|
|
637
|
+
include = computeGlobs(options.include, content?.raw.include, "**/*");
|
|
638
|
+
exclude = computeGlobs(options.exclude, content?.raw.exclude, "node_modules/**");
|
|
639
|
+
filter = createFilter(include, exclude);
|
|
634
640
|
const rootNames = Object.values(entries).map((entry) => ensureAbsolute(entry, root)).concat(content?.fileNames.filter(filter) || []).map(normalizePath);
|
|
635
641
|
host = ts.createCompilerHost(compilerOptions, true);
|
|
636
642
|
program = createProgram({ host, rootNames, options: compilerOptions });
|