From 2978a26262b853f904e1d75ed5f570c7a4ea29a4 Mon Sep 17 00:00:00 2001 From: Pedro Nauck Date: Wed, 10 Apr 2019 22:24:36 -0300 Subject: [PATCH] fix(babel-plugin-export-metadata): remove cache folders from parse --- other-packages/babel-plugin-export-metadata/src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/other-packages/babel-plugin-export-metadata/src/index.js b/other-packages/babel-plugin-export-metadata/src/index.js index b7548ff92..041d8703e 100644 --- a/other-packages/babel-plugin-export-metadata/src/index.js +++ b/other-packages/babel-plugin-export-metadata/src/index.js @@ -42,6 +42,8 @@ const addFileMetaProperties = (t, path, filename, name) => { const insertNodeExport = t => (path, state) => { const filename = getFilename(state) + if (/(\.cache|\.docz).+/.test(filename)) return + const name = get(path, 'node.declaration.id.name') const declarations = get(path, 'node.declaration.declarations') const specifiers = get(path, 'node.specifiers') @@ -63,6 +65,8 @@ const insertNodeExport = t => (path, state) => { const insertNodeExportDefault = t => (path, state) => { const filename = getFilename(state) + if (/(\.cache|\.docz).+/.test(filename)) return + const declaration = get(path, 'node.declaration', {}) if (/Function|Class|Identifier/.test(declaration.type)) {