@vixt/vue 0.0.5 → 0.0.6
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 +9 -11
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -18,11 +18,10 @@ function resolveLayersPlugins(layers, from) {
|
|
|
18
18
|
return `${pluginsDir}/*.ts`;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function generateMainTs(options, vixt
|
|
22
|
-
const { buildDir } = vixt.options;
|
|
23
|
-
const { rootId } = options;
|
|
24
|
-
const layersPluginsPath = resolveLayersPlugins(vixt._layers, path.join(
|
|
25
|
-
const baseURL = options?.baseURL ?? config.env.BASE_URL ?? "/";
|
|
21
|
+
function generateMainTs(options, vixt) {
|
|
22
|
+
const { buildDir, rootDir } = vixt.options;
|
|
23
|
+
const { rootId, baseURL } = options;
|
|
24
|
+
const layersPluginsPath = resolveLayersPlugins(vixt._layers, path.join(rootDir, buildDir));
|
|
26
25
|
const cssTemplate = options?.css?.map((e) => `import '${e}'`).join("\n");
|
|
27
26
|
const code = `/** Generated by Vixt */
|
|
28
27
|
// @ts-nocheck
|
|
@@ -53,7 +52,7 @@ Object.values(plugins).forEach((plugin) => typeof plugin === 'function' && plugi
|
|
|
53
52
|
|
|
54
53
|
app.mount('#${rootId}')
|
|
55
54
|
`;
|
|
56
|
-
fs.outputFileSync(path.resolve(
|
|
55
|
+
fs.outputFileSync(path.resolve(rootDir, buildDir, "main.ts"), code);
|
|
57
56
|
return code;
|
|
58
57
|
}
|
|
59
58
|
const name = "vixt:entry";
|
|
@@ -65,11 +64,9 @@ const entry = defineVixtModule({
|
|
|
65
64
|
meta: { name, configKey: "app" },
|
|
66
65
|
defaults: defaults$1,
|
|
67
66
|
setup(options, vixt) {
|
|
67
|
+
generateMainTs(options, vixt);
|
|
68
68
|
return {
|
|
69
|
-
name
|
|
70
|
-
configResolved(config) {
|
|
71
|
-
generateMainTs(options, vixt, config);
|
|
72
|
-
}
|
|
69
|
+
name
|
|
73
70
|
};
|
|
74
71
|
}
|
|
75
72
|
});
|
|
@@ -121,7 +118,8 @@ const defaults = {
|
|
|
121
118
|
},
|
|
122
119
|
typescript: {
|
|
123
120
|
references: ["types/typed-router.d.ts", "types/components.d.ts", "types/auto-imports.d.ts", "types/vite-env.d.ts"],
|
|
124
|
-
tsConfig: { compilerOptions: { types: ["vite-plugin-vue-layouts/client", "unplugin-vue-router/client"] } }
|
|
121
|
+
tsConfig: { compilerOptions: { types: ["vite-plugin-vue-layouts/client", "unplugin-vue-router/client"] } },
|
|
122
|
+
typeCheck: { vueTsc: true }
|
|
125
123
|
}
|
|
126
124
|
};
|
|
127
125
|
const index = createVixtPlugin({ defaults });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
32
32
|
"vue": "^3.4.31",
|
|
33
33
|
"vue-router": "^4.4.0",
|
|
34
|
-
"@vixt/core": "0.0.
|
|
34
|
+
"@vixt/core": "0.0.6"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "unbuild"
|