Skip to content

Commit 544d037

Browse files
committed
fork to sigma and fix babel issue
1 parent 7d2342a commit 544d037

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
2-
"name": "babel-plugin-lodash",
2+
"name": "@sigmacomputing/babel-plugin-lodash",
33
"version": "3.3.4",
44
"description": "Modular Lodash builds without the hassle.",
5-
"keywords": "babel-plugin, cherry-pick, lodash, modules",
5+
"keywords": [
6+
"babel-plugin",
7+
"cherry-pick",
8+
"lodash",
9+
"modules"
10+
],
611
"repository": "lodash/babel-plugin-lodash",
712
"license": "MIT",
813
"main": "lib/index.js",

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash'
2-
import { isModuleDeclaration } from '@babel/types'
2+
import { isImportDeclaration, isExportDeclaration } from '@babel/types'
33

44
import config from './config'
55
import importModule from './importModule'
@@ -72,7 +72,7 @@ export default function lodash({ types }) {
7272
let isModule = false
7373

7474
for (const node of file.ast.program.body) {
75-
if (isModuleDeclaration(node)) {
75+
if (isImportDeclaration(node) || isExportDeclaration(node)) {
7676
isModule = true
7777
break
7878
}

0 commit comments

Comments
 (0)