@vuedx/transforms
Advanced tools
Comparing version 0.7.6-next-1651050089.0 to 0.7.6-next-1651055813.0
@@ -32,4 +32,3 @@ 'use strict'; | ||
const T__namespace = /*#__PURE__*/_interopNamespace(T); | ||
const template__default = /*#__PURE__*/_interopDefaultLegacy(template); | ||
const generator__default = /*#__PURE__*/_interopDefaultLegacy(generator); | ||
const template__namespace = /*#__PURE__*/_interopNamespace(template); | ||
const MagicString__default = /*#__PURE__*/_interopDefaultLegacy(MagicString); | ||
@@ -73,6 +72,6 @@ | ||
.filter((node) => node !== false && T__namespace.isStatement(node))); | ||
const result = generator__default["default"](statement, { | ||
const result = new generator.CodeGenerator(statement, { | ||
comments: true, | ||
...options, | ||
}); | ||
}).generate(); | ||
if (sourceText == null) | ||
@@ -161,3 +160,3 @@ return result; | ||
function createDeclarationForScriptSetup() { | ||
const createExpr = template__default["default"](`const ${config.exportName} = ${config.defineComponent}( | ||
const createExpr = template__namespace.statement(`const ${config.exportName} = ${config.defineComponent}( | ||
%%props%%, | ||
@@ -178,3 +177,3 @@ %%emits%%, | ||
function createDeclarationForScript() { | ||
const createExpr = template__default["default"](`const ${config.exportName} = ${config.defineComponent}(%%options%%)`); | ||
const createExpr = template__namespace.statement(`const ${config.exportName} = ${config.defineComponent}(%%options%%)`); | ||
const options = findComponentOptions(ast); | ||
@@ -367,3 +366,3 @@ return createExpr({ | ||
}; | ||
const createExpr = template__default["default"](`const ${config.exportName} = %%value%%;`); | ||
const createExpr = template__namespace.statement(`const ${config.exportName} = %%value%%;`); | ||
const declaration = createExpr({ | ||
@@ -370,0 +369,0 @@ value: getExpressionOrReference(findTargetExpression(), config), |
{ | ||
"name": "@vuedx/transforms", | ||
"version": "0.7.6-next-1651050089.0", | ||
"version": "0.7.6-next-1651055813.0", | ||
"description": "AST Transforms", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
80773
1016