vite-plugin-dts 3.7.1 → 3.7.3
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/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -506,7 +506,7 @@ function transformAliasImport(filePath, content, aliases, exclude = []) {
|
|
|
506
506
|
return str;
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
const pureImportRE =
|
|
509
|
+
const pureImportRE = /^import\s?['"][^;\n]+?['"];?\n?/g;
|
|
510
510
|
function removePureImport(content) {
|
|
511
511
|
return content.replace(pureImportRE, "");
|
|
512
512
|
}
|
|
@@ -698,9 +698,9 @@ ${logPrefix} ${kolorist.yellow(
|
|
|
698
698
|
const { baseUrl, paths } = compilerOptions;
|
|
699
699
|
if (pathsToAliases && baseUrl && paths) {
|
|
700
700
|
const basePath = ensureAbsolute(baseUrl, configPath ? node_path.dirname(configPath) : root);
|
|
701
|
-
for (const [
|
|
701
|
+
for (const [pathWithAsterisk, replacements] of Object.entries(paths)) {
|
|
702
702
|
const find = new RegExp(
|
|
703
|
-
|
|
703
|
+
`^${pathWithAsterisk.replace(regexpSymbolRE, "\\$1").replace(asteriskRE, "(.+)")}$`
|
|
704
704
|
);
|
|
705
705
|
let index = 1;
|
|
706
706
|
aliases.push({
|
package/dist/index.mjs
CHANGED
|
@@ -504,7 +504,7 @@ function transformAliasImport(filePath, content, aliases, exclude = []) {
|
|
|
504
504
|
return str;
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
|
-
const pureImportRE =
|
|
507
|
+
const pureImportRE = /^import\s?['"][^;\n]+?['"];?\n?/g;
|
|
508
508
|
function removePureImport(content) {
|
|
509
509
|
return content.replace(pureImportRE, "");
|
|
510
510
|
}
|
|
@@ -696,9 +696,9 @@ ${logPrefix} ${yellow(
|
|
|
696
696
|
const { baseUrl, paths } = compilerOptions;
|
|
697
697
|
if (pathsToAliases && baseUrl && paths) {
|
|
698
698
|
const basePath = ensureAbsolute(baseUrl, configPath ? dirname(configPath) : root);
|
|
699
|
-
for (const [
|
|
699
|
+
for (const [pathWithAsterisk, replacements] of Object.entries(paths)) {
|
|
700
700
|
const find = new RegExp(
|
|
701
|
-
|
|
701
|
+
`^${pathWithAsterisk.replace(regexpSymbolRE, "\\$1").replace(asteriskRE, "(.+)")}$`
|
|
702
702
|
);
|
|
703
703
|
let index = 1;
|
|
704
704
|
aliases.push({
|