tiny-vue/patches/vite-plugin-importus@1.0.4....

64 lines
2.5 KiB
Diff

diff --git a/dist/index.d.ts b/dist/index.d.ts
index db9f95e0c23a27b1991782e5e1b824e4224ba2f8..1027527a0b49d55e57f95a52f0183ac691eb25b0 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1,6 +1,9 @@
interface ImportOption {
- [key: string]: any;
libraryName: string;
+ style?: string | boolean | ((name: string, file?: any) => string);
+ styleLibraryDirectory?: string;
+ customName?: (name: string, file: any) => string;
+ customStyleName?: (name: string) => string;
libraryDirectory?: string;
camel2DashComponentName?: boolean;
}
diff --git a/dist/index.js b/dist/index.js
index 8f41efa9facb84ec8f8c437cd09de1b0d34e664a..468456172970fc6224e1c367b9cd1d95b0c5546e 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -37,8 +37,9 @@ var import_acorn2 = require("acorn");
var import_magic_string = __toESM(require("magic-string"));
// src/format.ts
-var import_lodash = __toESM(require("lodash"));
-var kebabCase = import_lodash.default.kebabCase;
+var import_param_case = __toESM(require("param-case"));
+var kebabCase = import_param_case.paramCase;
+
function formatedComponentName(libraryName, componentName, option) {
const {
libraryDirectory = "lib",
@@ -316,7 +317,7 @@ function dynamicImportPlugin(options) {
throw new Error("Options must be array.");
}
const ext = import_path.default.extname(id).slice(1);
- if (["js", "jsx", "ts", "tsx"].indexOf(ext) > -1) {
+ if (["js", "jsx", "ts", "tsx", "vue"].indexOf(ext) > -1) {
code = await transform_default(code, importOptions);
}
return code;
diff --git a/dist/index.mjs b/dist/index.mjs
index 2813fc5d7336fcadf9e14f411d0624d58503872d..baf135c4932159f1d31d6f12d96920af2407761b 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -7,8 +7,8 @@ import { Parser as Parser2 } from "acorn";
import MagicString from "magic-string";
// src/format.ts
-import _ from "lodash";
-var kebabCase = _.kebabCase;
+import { paramCase } from 'param-case'
+var kebabCase = paramCase;
function formatedComponentName(libraryName, componentName, option) {
const {
libraryDirectory = "lib",
@@ -286,7 +286,7 @@ function dynamicImportPlugin(options) {
throw new Error("Options must be array.");
}
const ext = path.extname(id).slice(1);
- if (["js", "jsx", "ts", "tsx"].indexOf(ext) > -1) {
+ if (["js", "jsx", "ts", "tsx", "vue"].indexOf(ext) > -1) {
code = await transform_default(code, importOptions);
}
return code;