@zeus-js/bundler-plugin 0.1.0-beta.5 → 0.1.0-beta.7

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * bundler-plugin v0.1.0-beta.5
2
+ * bundler-plugin v0.1.0-beta.7
3
3
  * (c) 2026 baicie
4
4
  * Released under the MIT License.
5
5
  **/
@@ -36,15 +36,15 @@ let vite = require("vite");
36
36
  let node_fs = require("node:fs");
37
37
  node_fs = __toESM(node_fs, 1);
38
38
  let _zeus_js_component_analyzer = require("@zeus-js/component-analyzer");
39
- let fast_glob = require("fast-glob");
40
- fast_glob = __toESM(fast_glob, 1);
41
39
  let picomatch = require("picomatch");
42
40
  picomatch = __toESM(picomatch, 1);
43
41
  let node_fs_promises = require("node:fs/promises");
44
42
  node_fs_promises = __toESM(node_fs_promises, 1);
43
+ let fast_glob = require("fast-glob");
44
+ fast_glob = __toESM(fast_glob, 1);
45
45
  let _babel_core = require("@babel/core");
46
- let _babel_preset_typescript = require("@babel/preset-typescript");
47
- _babel_preset_typescript = __toESM(_babel_preset_typescript, 1);
46
+ let _babel_plugin_transform_typescript = require("@babel/plugin-transform-typescript");
47
+ _babel_plugin_transform_typescript = __toESM(_babel_plugin_transform_typescript, 1);
48
48
  let _zeus_js_compiler = require("@zeus-js/compiler");
49
49
  _zeus_js_compiler = __toESM(_zeus_js_compiler, 1);
50
50
  //#region packages/web-c/bundler-plugin/src/filter.ts
@@ -99,7 +99,7 @@ function resolveComponentExclude(exclude) {
99
99
  }
100
100
  function resolveTransformInclude(include, componentInclude) {
101
101
  if (include === null || include === void 0 ? void 0 : include.length) return include;
102
- return Array.from(new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
102
+ return Array.from(/* @__PURE__ */ new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
103
103
  }
104
104
  function resolveTransformExclude(exclude) {
105
105
  return (exclude === null || exclude === void 0 ? void 0 : exclude.length) ? exclude : DEFAULT_TRANSFORM_EXCLUDE;
@@ -279,29 +279,29 @@ function normalizeTagName(tag, stripPrefix) {
279
279
  //#endregion
280
280
  //#region packages/web-c/bundler-plugin/src/transform.ts
281
281
  async function transformZeus(options) {
282
- var _compilerOptions$modu;
283
282
  const { id, code, compiler, sourcemap = true, transpile = false } = options;
283
+ const filename = cleanUrl(id);
284
284
  const isTs = isTypeScriptLike(id);
285
- const isTsx = /\.[cm]?tsx$/.test(id.replace(/[?#].*$/, ""));
286
285
  const shouldRunCompiler = compiler !== false;
287
286
  const shouldStripTs = transpile && isTs;
288
287
  if (!shouldRunCompiler && !shouldStripTs) return null;
289
288
  const compilerOptions = compiler === false ? {} : compiler === void 0 ? {} : compiler;
290
- const result = await (0, _babel_core.transformAsync)(code, {
291
- filename: id,
292
- sourceMaps: sourcemap,
293
- plugins: shouldRunCompiler ? [[_zeus_js_compiler.default, {
289
+ const plugins = [];
290
+ if (shouldRunCompiler) {
291
+ var _compilerOptions$modu;
292
+ plugins.push([_zeus_js_compiler.default, {
294
293
  moduleName: (_compilerOptions$modu = compilerOptions.moduleName) !== null && _compilerOptions$modu !== void 0 ? _compilerOptions$modu : "@zeus-js/runtime-dom",
295
294
  generate: "dom",
296
295
  hydratable: false,
297
296
  delegateEvents: true,
298
297
  ...compilerOptions
299
- }]] : [],
300
- presets: shouldStripTs ? [[_babel_preset_typescript.default, {
301
- allExtensions: true,
302
- isTSX: isTsx,
303
- allowDeclareFields: true
304
- }]] : [],
298
+ }]);
299
+ }
300
+ if (shouldStripTs) plugins.push([_babel_plugin_transform_typescript.default, {}]);
301
+ const result = await (0, _babel_core.transformAsync)(code, {
302
+ filename,
303
+ sourceMaps: sourcemap,
304
+ plugins,
305
305
  parserOpts: {
306
306
  sourceType: "module",
307
307
  plugins: ["typescript", "jsx"]
@@ -459,7 +459,7 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
459
459
  exclude: componentExclude
460
460
  });
461
461
  const manifestResult = await createManifest(root, componentInclude, componentExclude);
462
- for (const file of await collectWatchFiles(root, componentInclude, componentExclude)) this.addWatchFile(file);
462
+ for (const file of manifestResult.dependencies) this.addWatchFile(file);
463
463
  const diagnostics = manifestResult.diagnostics;
464
464
  for (const diagnostic of diagnostics) {
465
465
  const message = formatDiagnostic(diagnostic);
@@ -524,13 +524,15 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
524
524
  const shouldRunZeus = shouldCompileZeus(id);
525
525
  const shouldStripTs = resolveTranspile(options.transpile, target) && isTypeScriptLike(id);
526
526
  if (!shouldRunZeus && !shouldStripTs) return null;
527
- return await transformZeus({
527
+ const result = await transformZeus({
528
528
  id,
529
529
  code,
530
530
  compiler: shouldRunZeus ? options.compiler : false,
531
531
  sourcemap: true,
532
532
  transpile: shouldStripTs
533
533
  });
534
+ if (!result) return null;
535
+ return result;
534
536
  },
535
537
  async generateBundle(_, bundle) {
536
538
  var _options$plugins2;
@@ -589,22 +591,15 @@ async function createManifest(root, include, exclude) {
589
591
  version: 1,
590
592
  components: []
591
593
  },
592
- diagnostics: []
594
+ diagnostics: [],
595
+ dependencies: []
593
596
  };
594
- return await (0, _zeus_js_component_analyzer.analyzeComponents)({
597
+ return await (0, _zeus_js_component_analyzer.analyzeComponentsWithDependencies)({
595
598
  root,
596
599
  include,
597
600
  exclude
598
601
  });
599
602
  }
600
- async function collectWatchFiles(root, include, exclude) {
601
- if (!include.length) return [];
602
- return await (0, fast_glob.default)(include, {
603
- cwd: root,
604
- absolute: true,
605
- ignore: exclude
606
- });
607
- }
608
603
  function resolveTsLikeImport(id, importer, options) {
609
604
  var _options$extensions;
610
605
  if (!importer) return null;
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * bundler-plugin v0.1.0-beta.5
2
+ * bundler-plugin v0.1.0-beta.7
3
3
  * (c) 2026 baicie
4
4
  * Released under the MIT License.
5
5
  **/
@@ -7,12 +7,12 @@ import { createRequire } from "node:module";
7
7
  import path from "node:path";
8
8
  import { mergeConfig } from "vite";
9
9
  import fs from "node:fs";
10
- import { analyzeComponents } from "@zeus-js/component-analyzer";
11
- import fg from "fast-glob";
10
+ import { analyzeComponentsWithDependencies } from "@zeus-js/component-analyzer";
12
11
  import picomatch from "picomatch";
13
12
  import fs$1 from "node:fs/promises";
13
+ import fg from "fast-glob";
14
14
  import { transformAsync } from "@babel/core";
15
- import presetTypeScript from "@babel/preset-typescript";
15
+ import transformTypeScript from "@babel/plugin-transform-typescript";
16
16
  import zeusCompiler from "@zeus-js/compiler";
17
17
  //#region packages/web-c/bundler-plugin/src/filter.ts
18
18
  function cleanUrl(id) {
@@ -66,7 +66,7 @@ function resolveComponentExclude(exclude) {
66
66
  }
67
67
  function resolveTransformInclude(include, componentInclude) {
68
68
  if (include === null || include === void 0 ? void 0 : include.length) return include;
69
- return Array.from(new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
69
+ return Array.from(/* @__PURE__ */ new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
70
70
  }
71
71
  function resolveTransformExclude(exclude) {
72
72
  return (exclude === null || exclude === void 0 ? void 0 : exclude.length) ? exclude : DEFAULT_TRANSFORM_EXCLUDE;
@@ -80,7 +80,7 @@ function hasErrorDiagnostics(diagnostics) {
80
80
  return diagnostics.some((item) => item.level === "error");
81
81
  }
82
82
  //#endregion
83
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/asyncToGenerator.js
83
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/asyncToGenerator.js
84
84
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
85
85
  try {
86
86
  var i = n[a](c), u = i.value;
@@ -106,7 +106,7 @@ function _asyncToGenerator(n) {
106
106
  };
107
107
  }
108
108
  //#endregion
109
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/typeof.js
109
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
110
110
  function _typeof(o) {
111
111
  "@babel/helpers - typeof";
112
112
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -116,7 +116,7 @@ function _typeof(o) {
116
116
  }, _typeof(o);
117
117
  }
118
118
  //#endregion
119
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPrimitive.js
119
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
120
120
  function toPrimitive(t, r) {
121
121
  if ("object" != _typeof(t) || !t) return t;
122
122
  var e = t[Symbol.toPrimitive];
@@ -128,13 +128,13 @@ function toPrimitive(t, r) {
128
128
  return ("string" === r ? String : Number)(t);
129
129
  }
130
130
  //#endregion
131
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPropertyKey.js
131
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
132
132
  function toPropertyKey(t) {
133
133
  var i = toPrimitive(t, "string");
134
134
  return "symbol" == _typeof(i) ? i : i + "";
135
135
  }
136
136
  //#endregion
137
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/defineProperty.js
137
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
138
138
  function _defineProperty(e, r, t) {
139
139
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
140
140
  value: t,
@@ -144,7 +144,7 @@ function _defineProperty(e, r, t) {
144
144
  }) : e[r] = t, e;
145
145
  }
146
146
  //#endregion
147
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/objectSpread2.js
147
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/objectSpread2.js
148
148
  function ownKeys(e, r) {
149
149
  var t = Object.keys(e);
150
150
  if (Object.getOwnPropertySymbols) {
@@ -368,28 +368,28 @@ function transformZeus(_x) {
368
368
  }
369
369
  function _transformZeus() {
370
370
  _transformZeus = _asyncToGenerator(function* (options) {
371
- var _compilerOptions$modu;
372
371
  const { id, code, compiler, sourcemap = true, transpile = false } = options;
372
+ const filename = cleanUrl(id);
373
373
  const isTs = isTypeScriptLike(id);
374
- const isTsx = /\.[cm]?tsx$/.test(id.replace(/[?#].*$/, ""));
375
374
  const shouldRunCompiler = compiler !== false;
376
375
  const shouldStripTs = transpile && isTs;
377
376
  if (!shouldRunCompiler && !shouldStripTs) return null;
378
377
  const compilerOptions = compiler === false ? {} : compiler === void 0 ? {} : compiler;
379
- const result = yield transformAsync(code, {
380
- filename: id,
381
- sourceMaps: sourcemap,
382
- plugins: shouldRunCompiler ? [[zeusCompiler, _objectSpread2({
378
+ const plugins = [];
379
+ if (shouldRunCompiler) {
380
+ var _compilerOptions$modu;
381
+ plugins.push([zeusCompiler, _objectSpread2({
383
382
  moduleName: (_compilerOptions$modu = compilerOptions.moduleName) !== null && _compilerOptions$modu !== void 0 ? _compilerOptions$modu : "@zeus-js/runtime-dom",
384
383
  generate: "dom",
385
384
  hydratable: false,
386
385
  delegateEvents: true
387
- }, compilerOptions)]] : [],
388
- presets: shouldStripTs ? [[presetTypeScript, {
389
- allExtensions: true,
390
- isTSX: isTsx,
391
- allowDeclareFields: true
392
- }]] : [],
386
+ }, compilerOptions)]);
387
+ }
388
+ if (shouldStripTs) plugins.push([transformTypeScript, {}]);
389
+ const result = yield transformAsync(code, {
390
+ filename,
391
+ sourceMaps: sourcemap,
392
+ plugins,
393
393
  parserOpts: {
394
394
  sourceType: "module",
395
395
  plugins: ["typescript", "jsx"]
@@ -545,7 +545,7 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
545
545
  exclude: componentExclude
546
546
  });
547
547
  const manifestResult = yield createManifest(root, componentInclude, componentExclude);
548
- for (const file of yield collectWatchFiles(root, componentInclude, componentExclude)) _this.addWatchFile(file);
548
+ for (const file of manifestResult.dependencies) _this.addWatchFile(file);
549
549
  const diagnostics = manifestResult.diagnostics;
550
550
  for (const diagnostic of diagnostics) {
551
551
  const message = formatDiagnostic(diagnostic);
@@ -612,13 +612,15 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
612
612
  const shouldRunZeus = shouldCompileZeus(id);
613
613
  const shouldStripTs = resolveTranspile(options.transpile, target) && isTypeScriptLike(id);
614
614
  if (!shouldRunZeus && !shouldStripTs) return null;
615
- return yield transformZeus({
615
+ const result = yield transformZeus({
616
616
  id,
617
617
  code,
618
618
  compiler: shouldRunZeus ? options.compiler : false,
619
619
  sourcemap: true,
620
620
  transpile: shouldStripTs
621
621
  });
622
+ if (!result) return null;
623
+ return result;
622
624
  })();
623
625
  },
624
626
  generateBundle(_, bundle) {
@@ -685,9 +687,10 @@ function _createManifest() {
685
687
  version: 1,
686
688
  components: []
687
689
  },
688
- diagnostics: []
690
+ diagnostics: [],
691
+ dependencies: []
689
692
  };
690
- return yield analyzeComponents({
693
+ return yield analyzeComponentsWithDependencies({
691
694
  root,
692
695
  include,
693
696
  exclude
@@ -695,20 +698,6 @@ function _createManifest() {
695
698
  });
696
699
  return _createManifest.apply(this, arguments);
697
700
  }
698
- function collectWatchFiles(_x4, _x5, _x6) {
699
- return _collectWatchFiles.apply(this, arguments);
700
- }
701
- function _collectWatchFiles() {
702
- _collectWatchFiles = _asyncToGenerator(function* (root, include, exclude) {
703
- if (!include.length) return [];
704
- return yield fg(include, {
705
- cwd: root,
706
- absolute: true,
707
- ignore: exclude
708
- });
709
- });
710
- return _collectWatchFiles.apply(this, arguments);
711
- }
712
701
  function resolveTsLikeImport(id, importer, options) {
713
702
  var _options$extensions;
714
703
  if (!importer) return null;
package/dist/vite.prod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * bundler-plugin v0.1.0-beta.5
2
+ * bundler-plugin v0.1.0-beta.7
3
3
  * (c) 2026 baicie
4
4
  * Released under the MIT License.
5
5
  **/
@@ -7,12 +7,12 @@ import { createRequire } from "node:module";
7
7
  import path from "node:path";
8
8
  import { mergeConfig } from "vite";
9
9
  import fs from "node:fs";
10
- import { analyzeComponents } from "@zeus-js/component-analyzer";
11
- import fg from "fast-glob";
10
+ import { analyzeComponentsWithDependencies } from "@zeus-js/component-analyzer";
12
11
  import picomatch from "picomatch";
13
12
  import fs$1 from "node:fs/promises";
13
+ import fg from "fast-glob";
14
14
  import { transformAsync } from "@babel/core";
15
- import presetTypeScript from "@babel/preset-typescript";
15
+ import transformTypeScript from "@babel/plugin-transform-typescript";
16
16
  import zeusCompiler from "@zeus-js/compiler";
17
17
  //#region packages/web-c/bundler-plugin/src/filter.ts
18
18
  function cleanUrl(id) {
@@ -66,7 +66,7 @@ function resolveComponentExclude(exclude) {
66
66
  }
67
67
  function resolveTransformInclude(include, componentInclude) {
68
68
  if (include === null || include === void 0 ? void 0 : include.length) return include;
69
- return Array.from(new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
69
+ return Array.from(/* @__PURE__ */ new Set([...DEFAULT_TRANSFORM_INCLUDE, ...componentInclude]));
70
70
  }
71
71
  function resolveTransformExclude(exclude) {
72
72
  return (exclude === null || exclude === void 0 ? void 0 : exclude.length) ? exclude : DEFAULT_TRANSFORM_EXCLUDE;
@@ -80,7 +80,7 @@ function hasErrorDiagnostics(diagnostics) {
80
80
  return diagnostics.some((item) => item.level === "error");
81
81
  }
82
82
  //#endregion
83
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/asyncToGenerator.js
83
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/asyncToGenerator.js
84
84
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
85
85
  try {
86
86
  var i = n[a](c), u = i.value;
@@ -106,7 +106,7 @@ function _asyncToGenerator(n) {
106
106
  };
107
107
  }
108
108
  //#endregion
109
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/typeof.js
109
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
110
110
  function _typeof(o) {
111
111
  "@babel/helpers - typeof";
112
112
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -116,7 +116,7 @@ function _typeof(o) {
116
116
  }, _typeof(o);
117
117
  }
118
118
  //#endregion
119
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPrimitive.js
119
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
120
120
  function toPrimitive(t, r) {
121
121
  if ("object" != _typeof(t) || !t) return t;
122
122
  var e = t[Symbol.toPrimitive];
@@ -128,13 +128,13 @@ function toPrimitive(t, r) {
128
128
  return ("string" === r ? String : Number)(t);
129
129
  }
130
130
  //#endregion
131
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPropertyKey.js
131
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
132
132
  function toPropertyKey(t) {
133
133
  var i = toPrimitive(t, "string");
134
134
  return "symbol" == _typeof(i) ? i : i + "";
135
135
  }
136
136
  //#endregion
137
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/defineProperty.js
137
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
138
138
  function _defineProperty(e, r, t) {
139
139
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
140
140
  value: t,
@@ -144,7 +144,7 @@ function _defineProperty(e, r, t) {
144
144
  }) : e[r] = t, e;
145
145
  }
146
146
  //#endregion
147
- //#region \0@oxc-project+runtime@0.134.0/helpers/esm/objectSpread2.js
147
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/objectSpread2.js
148
148
  function ownKeys(e, r) {
149
149
  var t = Object.keys(e);
150
150
  if (Object.getOwnPropertySymbols) {
@@ -368,28 +368,28 @@ function transformZeus(_x) {
368
368
  }
369
369
  function _transformZeus() {
370
370
  _transformZeus = _asyncToGenerator(function* (options) {
371
- var _compilerOptions$modu;
372
371
  const { id, code, compiler, sourcemap = true, transpile = false } = options;
372
+ const filename = cleanUrl(id);
373
373
  const isTs = isTypeScriptLike(id);
374
- const isTsx = /\.[cm]?tsx$/.test(id.replace(/[?#].*$/, ""));
375
374
  const shouldRunCompiler = compiler !== false;
376
375
  const shouldStripTs = transpile && isTs;
377
376
  if (!shouldRunCompiler && !shouldStripTs) return null;
378
377
  const compilerOptions = compiler === false ? {} : compiler === void 0 ? {} : compiler;
379
- const result = yield transformAsync(code, {
380
- filename: id,
381
- sourceMaps: sourcemap,
382
- plugins: shouldRunCompiler ? [[zeusCompiler, _objectSpread2({
378
+ const plugins = [];
379
+ if (shouldRunCompiler) {
380
+ var _compilerOptions$modu;
381
+ plugins.push([zeusCompiler, _objectSpread2({
383
382
  moduleName: (_compilerOptions$modu = compilerOptions.moduleName) !== null && _compilerOptions$modu !== void 0 ? _compilerOptions$modu : "@zeus-js/runtime-dom",
384
383
  generate: "dom",
385
384
  hydratable: false,
386
385
  delegateEvents: true
387
- }, compilerOptions)]] : [],
388
- presets: shouldStripTs ? [[presetTypeScript, {
389
- allExtensions: true,
390
- isTSX: isTsx,
391
- allowDeclareFields: true
392
- }]] : [],
386
+ }, compilerOptions)]);
387
+ }
388
+ if (shouldStripTs) plugins.push([transformTypeScript, {}]);
389
+ const result = yield transformAsync(code, {
390
+ filename,
391
+ sourceMaps: sourcemap,
392
+ plugins,
393
393
  parserOpts: {
394
394
  sourceType: "module",
395
395
  plugins: ["typescript", "jsx"]
@@ -545,7 +545,7 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
545
545
  exclude: componentExclude
546
546
  });
547
547
  const manifestResult = yield createManifest(root, componentInclude, componentExclude);
548
- for (const file of yield collectWatchFiles(root, componentInclude, componentExclude)) _this.addWatchFile(file);
548
+ for (const file of manifestResult.dependencies) _this.addWatchFile(file);
549
549
  const diagnostics = manifestResult.diagnostics;
550
550
  for (const diagnostic of diagnostics) {
551
551
  const message = formatDiagnostic(diagnostic);
@@ -612,13 +612,15 @@ function createZeusBundlerPlugin(options = {}, createOptions) {
612
612
  const shouldRunZeus = shouldCompileZeus(id);
613
613
  const shouldStripTs = resolveTranspile(options.transpile, target) && isTypeScriptLike(id);
614
614
  if (!shouldRunZeus && !shouldStripTs) return null;
615
- return yield transformZeus({
615
+ const result = yield transformZeus({
616
616
  id,
617
617
  code,
618
618
  compiler: shouldRunZeus ? options.compiler : false,
619
619
  sourcemap: true,
620
620
  transpile: shouldStripTs
621
621
  });
622
+ if (!result) return null;
623
+ return result;
622
624
  })();
623
625
  },
624
626
  generateBundle(_, bundle) {
@@ -685,9 +687,10 @@ function _createManifest() {
685
687
  version: 1,
686
688
  components: []
687
689
  },
688
- diagnostics: []
690
+ diagnostics: [],
691
+ dependencies: []
689
692
  };
690
- return yield analyzeComponents({
693
+ return yield analyzeComponentsWithDependencies({
691
694
  root,
692
695
  include,
693
696
  exclude
@@ -695,20 +698,6 @@ function _createManifest() {
695
698
  });
696
699
  return _createManifest.apply(this, arguments);
697
700
  }
698
- function collectWatchFiles(_x4, _x5, _x6) {
699
- return _collectWatchFiles.apply(this, arguments);
700
- }
701
- function _collectWatchFiles() {
702
- _collectWatchFiles = _asyncToGenerator(function* (root, include, exclude) {
703
- if (!include.length) return [];
704
- return yield fg(include, {
705
- cwd: root,
706
- absolute: true,
707
- ignore: exclude
708
- });
709
- });
710
- return _collectWatchFiles.apply(this, arguments);
711
- }
712
701
  function resolveTsLikeImport(id, importer, options) {
713
702
  var _options$extensions;
714
703
  if (!importer) return null;
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@zeus-js/bundler-plugin",
3
- "version": "0.1.0-beta.5",
4
- "description": "Zeus bundler plugin host",
5
3
  "type": "module",
6
- "main": "index.js",
7
- "module": "dist/bundler-plugin.esm-bundler.js",
8
- "types": "dist/bundler-plugin.d.ts",
9
- "files": [
10
- "index.js",
11
- "dist"
12
- ],
4
+ "version": "0.1.0-beta.7",
5
+ "description": "Zeus bundler plugin host",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/baicie/zeus.git",
10
+ "directory": "packages/web-c/bundler-plugin"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public",
14
+ "provenance": true
15
+ },
16
+ "sideEffects": false,
13
17
  "exports": {
14
18
  ".": {
15
19
  "types": "./dist/bundler-plugin.d.ts",
@@ -39,11 +43,35 @@
39
43
  "import": "./dist/outputPlugins/manifest.js"
40
44
  }
41
45
  },
42
- "sideEffects": false,
43
- "repository": {
44
- "type": "git",
45
- "url": "https://github.com/baicie/zeus"
46
+ "files": [
47
+ "index.js",
48
+ "dist"
49
+ ],
50
+ "peerDependencies": {
51
+ "rollup": "^4.0.0",
52
+ "rolldown": "^1.0.0",
53
+ "vite": "^8.0.5"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "rollup": {
57
+ "optional": true
58
+ },
59
+ "rolldown": {
60
+ "optional": true
61
+ },
62
+ "vite": {
63
+ "optional": true
64
+ }
65
+ },
66
+ "dependencies": {
67
+ "@babel/core": "^8.0.0",
68
+ "@babel/plugin-transform-typescript": "^8.0.0",
69
+ "fast-glob": "^3.3.3",
70
+ "picomatch": "^4.0.4",
71
+ "@zeus-js/compiler": "0.1.0-beta.7",
72
+ "@zeus-js/component-analyzer": "0.1.0-beta.7"
46
73
  },
74
+ "author": "Baicie",
47
75
  "buildOptions": {
48
76
  "name": "ZeusBundlerPlugin",
49
77
  "formats": [
@@ -69,29 +97,8 @@
69
97
  }
70
98
  ]
71
99
  },
72
- "dependencies": {
73
- "@babel/core": "^7.29.0",
74
- "@babel/preset-typescript": "^7.29.7",
75
- "fast-glob": "^3.3.3",
76
- "picomatch": "^4.0.4",
77
- "@zeus-js/compiler": "0.1.0-beta.5",
78
- "@zeus-js/component-analyzer": "0.1.0-beta.5"
79
- },
80
- "peerDependencies": {
81
- "rollup": "^4.0.0",
82
- "rolldown": "^1.0.0",
83
- "vite": "^8.0.5"
84
- },
85
- "peerDependenciesMeta": {
86
- "rollup": {
87
- "optional": true
88
- },
89
- "rolldown": {
90
- "optional": true
91
- },
92
- "vite": {
93
- "optional": true
94
- }
100
+ "engines": {
101
+ "node": "^22.18.0 || >=24.11.0"
95
102
  },
96
103
  "keywords": [
97
104
  "zeus",
@@ -100,6 +107,7 @@
100
107
  "rolldown",
101
108
  "web-components"
102
109
  ],
103
- "author": "Baicie",
104
- "license": "MIT"
110
+ "main": "index.js",
111
+ "module": "dist/bundler-plugin.esm-bundler.js",
112
+ "types": "dist/bundler-plugin.d.ts"
105
113
  }