@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 SoulLyoko
3
+ Copyright (c) 2024-PRESENT SoulLyoko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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 headTemplate = Object.entries(head).filter(([k]) => k !== "noscript").map(([tag, attrs]) => attrs.map((e) => resolveHeadTag(tag, e))).flat().join("\n");
364
- const noscriptTemplate = Object.entries(head).filter(([k]) => k === "noscript").map(([tag, attrs]) => attrs.map((e) => resolveHeadTag(tag, e))).flat().join("\n");
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.4",
4
+ "version": "0.5.0",
5
5
  "author": "SoulLyoko<https://github.com/SoulLyoko>",
6
6
  "license": "MIT",
7
- "homepage": "https://github.com/SoulLyoko/vixt#readme",
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.0",
45
+ "vite": "^7.0.2",
37
46
  "vite-plugin-checker": "^0.9.3"
38
47
  },
39
48
  "scripts": {