@vixt/vue 0.4.1 → 0.4.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/index.mjs +15 -17
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -147,23 +147,21 @@ const presetVue = defineVixtModule({
|
|
|
147
147
|
vueJsx: {},
|
|
148
148
|
router: {
|
|
149
149
|
dts: `${buildTypesDir}/typed-router.d.ts`,
|
|
150
|
-
routesFolder: pages
|
|
150
|
+
routesFolder: pages,
|
|
151
151
|
/** Fix overrides priority */
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// }
|
|
166
|
-
// },
|
|
152
|
+
extendRoute(route) {
|
|
153
|
+
const node = route.node.value;
|
|
154
|
+
const overrides = node._overrides;
|
|
155
|
+
if (overrides.size <= 1)
|
|
156
|
+
return;
|
|
157
|
+
for (const pageDir of [...pages].reverse()) {
|
|
158
|
+
const matched = [...overrides.keys()].find((e) => e.match(pageDir));
|
|
159
|
+
if (matched) {
|
|
160
|
+
node.components.set("default", matched);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
167
165
|
},
|
|
168
166
|
layouts: { layoutsDirs: layouts, pagesDirs: pages },
|
|
169
167
|
components: {
|
|
@@ -175,7 +173,7 @@ const presetVue = defineVixtModule({
|
|
|
175
173
|
imports: {
|
|
176
174
|
imports: ["vue", "@vueuse/core", "pinia", VueRouterAutoImports],
|
|
177
175
|
dts: `${buildTypesDir}/auto-imports.d.ts`,
|
|
178
|
-
dirs: [
|
|
176
|
+
dirs: [composables, constants, stores, utils, buildImportsDir].flat(),
|
|
179
177
|
vueTemplate: true
|
|
180
178
|
},
|
|
181
179
|
unocss: {},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
22
22
|
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
|
23
|
-
"@vue/compiler-sfc": "^3.5.14",
|
|
24
23
|
"@vueuse/core": "^13.2.0",
|
|
25
24
|
"pinia": "^3.0.2",
|
|
26
25
|
"pinia-plugin-persistedstate": "^4.3.0",
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
"vue": "^3.5.14",
|
|
34
33
|
"vue-router": "^4.5.1",
|
|
35
34
|
"vue-tsc": "^2.2.10",
|
|
36
|
-
"@vixt/core": "0.4.
|
|
35
|
+
"@vixt/core": "0.4.2"
|
|
37
36
|
},
|
|
38
37
|
"scripts": {
|
|
39
38
|
"build": "unbuild",
|