vite-plugin-dts 2.0.0 → 2.0.2
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 +326 -326
- package/README.zh-CN.md +325 -325
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -370,7 +370,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
370
370
|
let properties;
|
|
371
371
|
if (decl.init.type === "ObjectExpression") {
|
|
372
372
|
properties = decl.init.properties;
|
|
373
|
-
} else if (decl.init.type === "CallExpression" && decl.init.arguments[0]
|
|
373
|
+
} else if (decl.init.type === "CallExpression" && decl.init.arguments[0]?.type === "ObjectExpression") {
|
|
374
374
|
properties = decl.init.arguments[0].properties;
|
|
375
375
|
}
|
|
376
376
|
if (!properties)
|
|
@@ -387,7 +387,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
387
387
|
if (node.type === "ExportDefaultDeclaration") {
|
|
388
388
|
if (node.declaration.type === "ObjectExpression") {
|
|
389
389
|
options = node.declaration.properties;
|
|
390
|
-
} else if (node.declaration.type === "CallExpression" && node.declaration.arguments[0]
|
|
390
|
+
} else if (node.declaration.type === "CallExpression" && node.declaration.arguments[0]?.type === "ObjectExpression") {
|
|
391
391
|
options = node.declaration.arguments[0].properties;
|
|
392
392
|
} else if (node.declaration.type === "Identifier") {
|
|
393
393
|
if (declRecord.has(node.declaration.name)) {
|
|
@@ -421,7 +421,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
if (option.type === "ObjectProperty" && option.key.type === "Identifier" && option.key.name === "components") {
|
|
424
|
-
source.
|
|
424
|
+
source.overwrite(option.value.start, option.value.end, "undefined");
|
|
425
425
|
}
|
|
426
426
|
if (option.type === "ObjectMethod" && option.key.type === "Identifier" && option.key.name === "setup") {
|
|
427
427
|
let exposed;
|
|
@@ -762,7 +762,7 @@ ${kolorist.cyan(
|
|
|
762
762
|
if (!tsConfig.exclude) {
|
|
763
763
|
tsConfig.exclude = currentConfig.exclude;
|
|
764
764
|
}
|
|
765
|
-
currentConfigPath = currentConfig.extends;
|
|
765
|
+
currentConfigPath = currentConfig.extends && ensureAbsolute(currentConfig.extends, node_path.dirname(currentConfigPath));
|
|
766
766
|
}
|
|
767
767
|
include = ensureArray(options.include ?? tsConfig.include ?? "**/*").map(normalizeGlob);
|
|
768
768
|
exclude = ensureArray(options.exclude ?? tsConfig.exclude ?? "node_modules/**").map(
|
package/dist/index.mjs
CHANGED
|
@@ -375,7 +375,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
375
375
|
let properties;
|
|
376
376
|
if (decl.init.type === "ObjectExpression") {
|
|
377
377
|
properties = decl.init.properties;
|
|
378
|
-
} else if (decl.init.type === "CallExpression" && decl.init.arguments[0]
|
|
378
|
+
} else if (decl.init.type === "CallExpression" && decl.init.arguments[0]?.type === "ObjectExpression") {
|
|
379
379
|
properties = decl.init.arguments[0].properties;
|
|
380
380
|
}
|
|
381
381
|
if (!properties)
|
|
@@ -392,7 +392,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
392
392
|
if (node.type === "ExportDefaultDeclaration") {
|
|
393
393
|
if (node.declaration.type === "ObjectExpression") {
|
|
394
394
|
options = node.declaration.properties;
|
|
395
|
-
} else if (node.declaration.type === "CallExpression" && node.declaration.arguments[0]
|
|
395
|
+
} else if (node.declaration.type === "CallExpression" && node.declaration.arguments[0]?.type === "ObjectExpression") {
|
|
396
396
|
options = node.declaration.arguments[0].properties;
|
|
397
397
|
} else if (node.declaration.type === "Identifier") {
|
|
398
398
|
if (declRecord.has(node.declaration.name)) {
|
|
@@ -426,7 +426,7 @@ function preprocessVueCode(code, setupScript) {
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
if (option.type === "ObjectProperty" && option.key.type === "Identifier" && option.key.name === "components") {
|
|
429
|
-
source.
|
|
429
|
+
source.overwrite(option.value.start, option.value.end, "undefined");
|
|
430
430
|
}
|
|
431
431
|
if (option.type === "ObjectMethod" && option.key.type === "Identifier" && option.key.name === "setup") {
|
|
432
432
|
let exposed;
|
|
@@ -767,7 +767,7 @@ ${cyan(
|
|
|
767
767
|
if (!tsConfig.exclude) {
|
|
768
768
|
tsConfig.exclude = currentConfig.exclude;
|
|
769
769
|
}
|
|
770
|
-
currentConfigPath = currentConfig.extends;
|
|
770
|
+
currentConfigPath = currentConfig.extends && ensureAbsolute(currentConfig.extends, dirname(currentConfigPath));
|
|
771
771
|
}
|
|
772
772
|
include = ensureArray(options.include ?? tsConfig.include ?? "**/*").map(normalizeGlob);
|
|
773
773
|
exclude = ensureArray(options.exclude ?? tsConfig.exclude ?? "node_modules/**").map(
|