Skip to content

Commit 0f85300

Browse files
author
Alan Wang
authored
fix: change named import to default import (#61)
1 parent 4a7bf17 commit 0f85300

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

transformations/__tests__/root-prop-to-use.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ defineInlineTest(
4444
transform,
4545
{ rootPropName: '', isGlobalApi: true },
4646
`Vue.createApp();`,
47-
`import { api1 } from "../src/directive/permission/api1.js";
48-
import { api2 } from "../src/directive/api2.js";
47+
`import api1 from "../src/directive/permission/api1.js";
48+
import api2 from "../src/directive/api2.js";
4949
Vue.createApp().use(api1).use(api2);`,
5050
'Can recognize global api use'
5151
)

transformations/root-prop-to-use.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export const transformAST: ASTTransformation<Params> = (
6262
{ root, j },
6363
{
6464
specifier: {
65-
type: 'named',
66-
imported: api.name
65+
type: 'default',
66+
local: api.name
6767
},
6868
source: '../' + api.path
6969
}

0 commit comments

Comments
 (0)