@vixt/core 0.4.5 → 0.5.1

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
@@ -128,7 +128,7 @@ async function applyLayerModules(layers) {
128
128
  for (const m of modulesDirs.reverse()) {
129
129
  if (fs.existsSync(m)) {
130
130
  const files = fs.readdirSync(m);
131
- for (const f of files) {
131
+ for (const f of files.filter((f2) => /(?:t|j)s$/.test(f2))) {
132
132
  const p = path.resolve(m, f);
133
133
  const module = await import(
134
134
  /* @vite-ignore */
@@ -361,8 +361,9 @@ function generateIndexHtml(options, vixt) {
361
361
  <!-- This file transform from '${path.basename(buildDir)}/index.html' -->
362
362
  `);
363
363
  const { head = {}, rootTag, rootId, entryFile } = options;
364
- const headTemplate = Object.entries(head).filter(([k]) => k !== "noscript").map(([tag, attrs]) => attrs.map((e) => resolveHeadTag(tag, e))).flat().join("\n");
365
- 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");
366
367
  let { loadingTemplate = "" } = options;
367
368
  if (!loadingTemplate) {
368
369
  for (const layer of vixt._layers) {
@@ -413,7 +414,7 @@ function generatePlugins(vixt) {
413
414
  let i = 0;
414
415
  for (const pluginsDir of pluginsDirs.reverse()) {
415
416
  const files = fs.existsSync(pluginsDir) ? fs.readdirSync(pluginsDir) : [];
416
- for (const f of files) {
417
+ for (const f of files.filter((f2) => /(?:t|j)sx?$/.test(f2))) {
417
418
  const p = path.resolve(pluginsDir, f);
418
419
  const pluginName = `__plugin_${i}`;
419
420
  pluginsImportTemplate += `import ${pluginName} from '${p}'
package/package.json CHANGED
@@ -1,11 +1,20 @@
1
1
  {
2
2
  "name": "@vixt/core",
3
3
  "type": "module",
4
- "version": "0.4.5",
4
+ "version": "0.5.1",
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": {