babel-plugin-named-asset-import 0.3.3 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -12
- package/package.json +4 -4
package/index.js
CHANGED
@@ -35,12 +35,7 @@ function namedAssetImportPlugin({ types: t }) {
|
|
35
35
|
|
36
36
|
return {
|
37
37
|
visitor: {
|
38
|
-
ExportNamedDeclaration(
|
39
|
-
path,
|
40
|
-
{
|
41
|
-
opts: { loaderMap },
|
42
|
-
}
|
43
|
-
) {
|
38
|
+
ExportNamedDeclaration(path, { opts: { loaderMap } }) {
|
44
39
|
if (!path.node.source) {
|
45
40
|
return;
|
46
41
|
}
|
@@ -67,12 +62,7 @@ function namedAssetImportPlugin({ types: t }) {
|
|
67
62
|
);
|
68
63
|
});
|
69
64
|
},
|
70
|
-
ImportDeclaration(
|
71
|
-
path,
|
72
|
-
{
|
73
|
-
opts: { loaderMap },
|
74
|
-
}
|
75
|
-
) {
|
65
|
+
ImportDeclaration(path, { opts: { loaderMap } }) {
|
76
66
|
replaceMatchingSpecifiers(path, loaderMap, (specifier, sourcePath) => {
|
77
67
|
if (t.isImportDefaultSpecifier(specifier)) {
|
78
68
|
return t.importDeclaration(
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babel-plugin-named-asset-import",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.7",
|
4
4
|
"description": "Babel plugin for named asset imports in Create React App",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -19,11 +19,11 @@
|
|
19
19
|
"@babel/core": "^7.1.0"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
22
|
-
"babel-plugin-tester": "^
|
23
|
-
"jest": "
|
22
|
+
"babel-plugin-tester": "^8.0.1",
|
23
|
+
"jest": "26.6.0"
|
24
24
|
},
|
25
25
|
"scripts": {
|
26
26
|
"test": "jest"
|
27
27
|
},
|
28
|
-
"gitHead": "
|
28
|
+
"gitHead": "ed958938f642007645dd5ac3466db36202f8754e"
|
29
29
|
}
|