UNPKG
shendu-portal-plugin-vue
Version:
latest (1.0.35)
1.0.35
1.0.34
1.0.33
1.0.32
1.0.31
1.0.30
1.0.29
shendu-portal-plugin-vue
/
src
/
global-api-treeshaking.js
11 lines
(8 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
module.exports =
function
(
ast
)
{
const
script
= ast.parseOptions && ast.parseOptions.language ===
'vue'
? ast.
find
(
'<script></script>'
) : ast; script.
replace
(`import $_$
from
'vue'
;`, `import *
as
$_$
from
'vue'
;`);
return
ast; };