From 8560646be2c0fe50921860d81995ed8ed6ef3bcb Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 24 Sep 2025 19:35:58 +0000 Subject: [PATCH] chore(babel-plugin-stub-vue-imports): remove unused Babel plugin for stubbing Vue imports to clean up the codebase --- scripts/babel-plugin-stub-vue-imports.cjs | 32 ----------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/babel-plugin-stub-vue-imports.cjs diff --git a/scripts/babel-plugin-stub-vue-imports.cjs b/scripts/babel-plugin-stub-vue-imports.cjs deleted file mode 100644 index 48b9779e8..000000000 --- a/scripts/babel-plugin-stub-vue-imports.cjs +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = function(babel) { - const { types: t } = babel; - - return { - visitor: { - ImportDeclaration(path) { - const source = path.node.source.value; - - // Handle Vue files - if (source.endsWith('.vue')) { - const specifiers = path.node.specifiers; - if (specifiers.length > 0 && specifiers[0].type === 'ImportDefaultSpecifier') { - const name = specifiers[0].local.name; - // Replace with a variable declaration - path.replaceWith( - t.variableDeclaration('const', [ - t.variableDeclarator( - t.identifier(name), - t.objectExpression([]) - ) - ]) - ); - } - } - // Handle CSS files - just remove the import - else if (source.endsWith('.css') || source.endsWith('.scss') || source.endsWith('.less')) { - path.remove(); - } - } - } - }; -}; \ No newline at end of file