@vixt/core 0.4.4 → 0.5.0
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/LICENSE +1 -1
- package/dist/node/index.mjs +4 -4
- package/package.json +12 -3
package/LICENSE
CHANGED
package/dist/node/index.mjs
CHANGED
|
@@ -38,6 +38,7 @@ function applyLayers(layers, config) {
|
|
|
38
38
|
}
|
|
39
39
|
if (layer.cwd?.includes("node_modules")) {
|
|
40
40
|
const newCwd = resolve(buildLayersDir, layerName);
|
|
41
|
+
fs.removeSync(newCwd);
|
|
41
42
|
fs.copySync(layer.cwd, newCwd, {
|
|
42
43
|
filter: (src) => {
|
|
43
44
|
const nodeModulesPath = resolve(layer.cwd, "node_modules");
|
|
@@ -360,8 +361,9 @@ function generateIndexHtml(options, vixt) {
|
|
|
360
361
|
<!-- This file transform from '${path.basename(buildDir)}/index.html' -->
|
|
361
362
|
`);
|
|
362
363
|
const { head = {}, rootTag, rootId, entryFile } = options;
|
|
363
|
-
const
|
|
364
|
-
const
|
|
364
|
+
const heads = Object.entries(head);
|
|
365
|
+
const headTemplate = heads.filter(([k]) => k !== "noscript").map(([tag, attrs]) => attrs.map((e) => resolveHeadTag(tag, e)).reverse()).flat().join("\n");
|
|
366
|
+
const noscriptTemplate = heads.filter(([k]) => k === "noscript").map(([tag, attrs]) => attrs.map((e) => resolveHeadTag(tag, e)).reverse()).flat().join("\n");
|
|
365
367
|
let { loadingTemplate = "" } = options;
|
|
366
368
|
if (!loadingTemplate) {
|
|
367
369
|
for (const layer of vixt._layers) {
|
|
@@ -443,8 +445,6 @@ async function loadVixt(opts) {
|
|
|
443
445
|
const isForce = !!parsedArgv.options.force;
|
|
444
446
|
if (isForce) {
|
|
445
447
|
fs.removeSync(result.config.buildDir);
|
|
446
|
-
} else {
|
|
447
|
-
fs.removeSync(result.config.buildLayersDir);
|
|
448
448
|
}
|
|
449
449
|
result.layers = applyLayers(result.layers ?? [], result.config);
|
|
450
450
|
const layerModules = await applyLayerModules(result.layers ?? []);
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.
|
|
7
|
+
"homepage": "https://soullyoko.github.io/vixt/",
|
|
8
8
|
"repository": "https://github.com/SoulLyoko/vixt.git",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"vixt",
|
|
11
|
+
"vite",
|
|
12
|
+
"nuxt",
|
|
13
|
+
"vue",
|
|
14
|
+
"uni",
|
|
15
|
+
"vitepress",
|
|
16
|
+
"react"
|
|
17
|
+
],
|
|
9
18
|
"exports": {
|
|
10
19
|
".": {
|
|
11
20
|
"types": "./dist/node/index.d.ts",
|
|
@@ -33,7 +42,7 @@
|
|
|
33
42
|
"pathe": "^2.0.3",
|
|
34
43
|
"pkg-types": "^2.2.0",
|
|
35
44
|
"tsx": "^4.20.3",
|
|
36
|
-
"vite": "^7.0.
|
|
45
|
+
"vite": "^7.0.2",
|
|
37
46
|
"vite-plugin-checker": "^0.9.3"
|
|
38
47
|
},
|
|
39
48
|
"scripts": {
|