@vixt/core 0.5.4 → 0.5.5

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.
@@ -128,13 +128,17 @@ 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.filter((f2) => /(?:t|j)s$/.test(f2))) {
131
+ for (const f of files) {
132
132
  const p = path.resolve(m, f);
133
- const module = await import(
134
- /* @vite-ignore */
135
- pathToFileURL(p)
136
- ).then((m2) => m2.default);
137
- modules.push(module);
133
+ try {
134
+ const module = await import(
135
+ /* @vite-ignore */
136
+ pathToFileURL(p)
137
+ ).then((m2) => m2.default);
138
+ modules.push(module);
139
+ } catch (error) {
140
+ console.error("[LoadVixtModule Error]:", error);
141
+ }
138
142
  }
139
143
  }
140
144
  }
@@ -415,7 +419,7 @@ function generatePlugins(vixt) {
415
419
  let i = 0;
416
420
  for (const pluginsDir of pluginsDirs.reverse()) {
417
421
  const files = fs.existsSync(pluginsDir) ? fs.readdirSync(pluginsDir) : [];
418
- for (const f of files.filter((f2) => /(?:t|j)sx?$/.test(f2))) {
422
+ for (const f of files.filter((f2) => /[jt]sx?$/.test(f2))) {
419
423
  const p = path.resolve(pluginsDir, f);
420
424
  const pluginName = `__plugin_${i}`;
421
425
  pluginsImportTemplate += `import ${pluginName} from '${p}'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixt/core",
3
3
  "type": "module",
4
- "version": "0.5.4",
4
+ "version": "0.5.5",
5
5
  "author": "SoulLyoko<https://github.com/SoulLyoko>",
6
6
  "license": "MIT",
7
7
  "homepage": "https://soullyoko.github.io/vixt/",