versacompiler 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/minify.js +1 -0
- package/dist/compiler/vuejs.js +4 -2
- package/package.json +26 -25
package/dist/compiler/minify.js
CHANGED
package/dist/compiler/vuejs.js
CHANGED
|
@@ -47,8 +47,10 @@ class VueHMRInjectionCache {
|
|
|
47
47
|
// Generar nueva inyección HMR
|
|
48
48
|
const vueImportPattern = /import\s*\{[^}]*\bref\b[^}]*\}\s*from\s*['"]vue['"]/;
|
|
49
49
|
const hasRefImport = vueImportPattern.test(originalData);
|
|
50
|
+
// ✨ FIX: Construir el import dinámicamente para evitar que el compilador lo transforme
|
|
51
|
+
const vueRefImport = ['import', '{ ref }', 'from', '"vue"'].join(' ') + ';';
|
|
50
52
|
const varContent = `
|
|
51
|
-
${hasRefImport ? '' :
|
|
53
|
+
${hasRefImport ? '' : vueRefImport}
|
|
52
54
|
const versaComponentKey = ref(0);
|
|
53
55
|
`;
|
|
54
56
|
let injectedData;
|
|
@@ -249,7 +251,7 @@ export const preCompileVue = async (data, source, isProd = false) => {
|
|
|
249
251
|
hoistStatic: isProd,
|
|
250
252
|
cacheHandlers: isProd,
|
|
251
253
|
runtimeGlobalName: 'Vue',
|
|
252
|
-
runtimeModuleName: '
|
|
254
|
+
runtimeModuleName: 'vue',
|
|
253
255
|
whitespace: 'condense',
|
|
254
256
|
ssr: false,
|
|
255
257
|
comments: !isProd, // ✨ Eliminar comentarios HTML del template
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "versacompiler",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Una herramienta para compilar y minificar archivos .vue, .js y .ts para proyectos de Vue 3 con soporte para TypeScript.",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"dev": "tsx --watch src/main.ts --watch --verbose --tailwind",
|
|
20
20
|
"file": "tsx src/main.ts ",
|
|
21
|
-
"compile": "tsx src/main.ts --all --cc
|
|
21
|
+
"compile": "tsx src/main.ts --all --cc -y --verbose --prod",
|
|
22
|
+
"compileDev": "tsx src/main.ts --all --cc -y --verbose",
|
|
22
23
|
"test": "vitest run",
|
|
23
24
|
"test:watch": "vitest",
|
|
24
25
|
"test:ui": "vitest --ui",
|
|
@@ -47,17 +48,17 @@
|
|
|
47
48
|
},
|
|
48
49
|
"homepage": "https://github.com/kriollo/versaCompiler#readme",
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@vue/compiler-dom": "^3.5.
|
|
51
|
-
"@vue/reactivity": "^3.5.
|
|
52
|
-
"@vue/runtime-core": "^3.5.
|
|
53
|
-
"@vue/runtime-dom": "^3.5.
|
|
51
|
+
"@vue/compiler-dom": "^3.5.26",
|
|
52
|
+
"@vue/reactivity": "^3.5.26",
|
|
53
|
+
"@vue/runtime-core": "^3.5.26",
|
|
54
|
+
"@vue/runtime-dom": "^3.5.26",
|
|
54
55
|
"browser-sync": "^3.0.4",
|
|
55
56
|
"chalk": "5.6.2",
|
|
56
57
|
"chokidar": "^5.0.0",
|
|
57
|
-
"enhanced-resolve": "^5.18.
|
|
58
|
-
"execa": "^9.6.
|
|
58
|
+
"enhanced-resolve": "^5.18.4",
|
|
59
|
+
"execa": "^9.6.1",
|
|
59
60
|
"find-root": "^1.1.0",
|
|
60
|
-
"fs-extra": "^11.3.
|
|
61
|
+
"fs-extra": "^11.3.3",
|
|
61
62
|
"get-port": "^7.1.0",
|
|
62
63
|
"minify-html-literals": "^1.3.5",
|
|
63
64
|
"minimatch": "^10.1.1",
|
|
@@ -65,43 +66,43 @@
|
|
|
65
66
|
"oxc-parser": "^0.108.0",
|
|
66
67
|
"oxc-transform": "^0.108.0",
|
|
67
68
|
"resolve": "^1.22.11",
|
|
68
|
-
"tsx": "^4.
|
|
69
|
+
"tsx": "^4.21.0",
|
|
69
70
|
"typescript": "^5.9.3",
|
|
70
71
|
"vue": "3.5.26",
|
|
71
72
|
"yargs": "^18.0.0"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@eslint/eslintrc": "^3.3.
|
|
75
|
-
"@tailwindcss/cli": "^4.1.
|
|
75
|
+
"@eslint/eslintrc": "^3.3.3",
|
|
76
|
+
"@tailwindcss/cli": "^4.1.18",
|
|
76
77
|
"@types/browser-sync": "^2.29.1",
|
|
77
78
|
"@types/find-root": "^1.1.4",
|
|
78
79
|
"@types/fs-extra": "^11.0.4",
|
|
79
80
|
"@types/jest": "^30.0.0",
|
|
80
81
|
"@types/mocha": "^10.0.10",
|
|
81
|
-
"@types/node": "^25.0.
|
|
82
|
+
"@types/node": "^25.0.9",
|
|
82
83
|
"@types/resolve": "^1.20.6",
|
|
83
84
|
"@types/yargs": "^17.0.35",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
85
|
-
"@typescript-eslint/parser": "^8.
|
|
86
|
-
"@vitest/coverage-v8": "^4.0.
|
|
87
|
-
"@vitest/ui": "^4.0.
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
86
|
+
"@typescript-eslint/parser": "^8.53.0",
|
|
87
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
88
|
+
"@vitest/ui": "^4.0.17",
|
|
88
89
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
89
90
|
"@vue/test-utils": "^2.4.6",
|
|
90
91
|
"code-tag": "^1.2.0",
|
|
91
|
-
"eslint": "^9.39.
|
|
92
|
+
"eslint": "^9.39.2",
|
|
92
93
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
93
94
|
"eslint-plugin-import": "^2.32.0",
|
|
94
|
-
"eslint-plugin-oxlint": "^1.
|
|
95
|
+
"eslint-plugin-oxlint": "^1.39.0",
|
|
95
96
|
"eslint-plugin-promise": "^7.2.1",
|
|
96
97
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
97
|
-
"eslint-plugin-vue": "^10.
|
|
98
|
-
"oxlint": "^1.
|
|
98
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
99
|
+
"oxlint": "^1.39.0",
|
|
99
100
|
"pinia": "^3.0.4",
|
|
100
101
|
"prettier": "3.8.0",
|
|
101
|
-
"rimraf": "^6.1.
|
|
102
|
-
"sweetalert2": "^11.26.
|
|
103
|
-
"tailwindcss": "^4.1.
|
|
104
|
-
"vitest": "^4.0.
|
|
102
|
+
"rimraf": "^6.1.2",
|
|
103
|
+
"sweetalert2": "^11.26.17",
|
|
104
|
+
"tailwindcss": "^4.1.18",
|
|
105
|
+
"vitest": "^4.0.17",
|
|
105
106
|
"vue-eslint-parser": "^10.2.0",
|
|
106
107
|
"vue-router": "^4.6.4"
|
|
107
108
|
},
|