[skip ci] fix getPluginTarget

main
V 1 year ago
parent 98a03c8862
commit 817f0f7473
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -22,7 +22,7 @@
*/ */
export function getPluginTarget(filePath) { export function getPluginTarget(filePath) {
const pathParts = filePath.split(/[/\\]/); const pathParts = filePath.split(/[/\\]/);
if (/^index\.tsx?$/.test(filePath.at(-1))) pathParts.pop(); if (/^index\.tsx?$/.test(pathParts.at(-1))) pathParts.pop();
const identifier = pathParts.at(-1).replace(/\.tsx?$/, ""); const identifier = pathParts.at(-1).replace(/\.tsx?$/, "");
const identiferBits = identifier.split("."); const identiferBits = identifier.split(".");

Loading…
Cancel
Save