elit 3.2.0 → 3.2.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/dist/cli.js CHANGED
@@ -1435,7 +1435,7 @@ var require_package = __commonJS({
1435
1435
  "package.json"(exports2, module2) {
1436
1436
  module2.exports = {
1437
1437
  name: "elit",
1438
- version: "3.2.0",
1438
+ version: "3.2.1",
1439
1439
  description: "Optimized lightweight library for creating DOM elements with reactive state",
1440
1440
  main: "dist/index.js",
1441
1441
  module: "dist/index.mjs",
@@ -1702,30 +1702,54 @@ async function loadConfigFile(configPath) {
1702
1702
  const { join: join2, dirname: dirname2 } = await Promise.resolve().then(() => (init_path(), path_exports));
1703
1703
  const tempFile = join2(tmpdir(), `elit-config-${Date.now()}.mjs`);
1704
1704
  const configDir = dirname2(configPath);
1705
- const buildOptions = {
1705
+ await build3({
1706
1706
  entryPoints: [configPath],
1707
1707
  bundle: true,
1708
1708
  format: "esm",
1709
- platform: "neutral",
1709
+ platform: "node",
1710
1710
  outfile: tempFile,
1711
1711
  write: true,
1712
1712
  target: "es2020",
1713
1713
  // Don't bundle any dependencies, only bundle the config file itself
1714
1714
  packages: "external",
1715
- // External node_modules but allow inline of elit package
1716
- external: (context) => {
1717
- if (context.path.includes("node_modules/elit") || context.path.startsWith("elit/")) {
1718
- return false;
1719
- }
1720
- if (context.path.includes("node_modules")) {
1721
- return true;
1722
- }
1723
- return false;
1724
- },
1715
+ // Mark all Node.js built-ins as external
1716
+ external: [
1717
+ "fs",
1718
+ "path",
1719
+ "os",
1720
+ "crypto",
1721
+ "http",
1722
+ "https",
1723
+ "stream",
1724
+ "util",
1725
+ "url",
1726
+ "querystring",
1727
+ "events",
1728
+ "buffer",
1729
+ "child_process",
1730
+ "cluster",
1731
+ "dgram",
1732
+ "dns",
1733
+ "net",
1734
+ "tls",
1735
+ "worker_threads",
1736
+ "zlib",
1737
+ "readline",
1738
+ "repl",
1739
+ "vm",
1740
+ "assert",
1741
+ "console",
1742
+ "timers",
1743
+ "async_hooks",
1744
+ "perf_hooks",
1745
+ "module",
1746
+ "process",
1747
+ "v8",
1748
+ "inspector"
1749
+ ],
1725
1750
  // Use the config directory as the working directory for resolution
1726
1751
  absWorkingDir: configDir
1727
- };
1728
- await build3(buildOptions);
1752
+ });
1729
1753
  const config = await importConfigModule(tempFile);
1730
1754
  await safeCleanup(tempFile);
1731
1755
  return config;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2C9E,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,qEAAqE;IACrE,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACtC,mCAAmC;IACnC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAE3D;AAUD;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,GAAE,MAAsB,EAAE,GAAG,GAAE,MAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCzG;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAgBxF;AAoED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,MAAM,EAAE,CAAC,GAAG,SAAS,EACrB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GACpB,CAAC,CAWH"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2C9E,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,qEAAqE;IACrE,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACtC,mCAAmC;IACnC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAE3D;AAUD;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,GAAE,MAAsB,EAAE,GAAG,GAAE,MAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCzG;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAgBxF;AA8DD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,MAAM,EAAE,CAAC,GAAG,SAAS,EACrB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GACpB,CAAC,CAWH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elit",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Optimized lightweight library for creating DOM elements with reactive state",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/config.ts CHANGED
@@ -153,33 +153,27 @@ async function loadConfigFile(configPath: string): Promise<ElitConfig> {
153
153
  // Bundle the TypeScript config with proper path resolution
154
154
  const configDir = dirname(configPath);
155
155
 
156
- const buildOptions: any = {
156
+ await build({
157
157
  entryPoints: [configPath],
158
158
  bundle: true,
159
159
  format: 'esm',
160
- platform: 'neutral',
160
+ platform: 'node',
161
161
  outfile: tempFile,
162
162
  write: true,
163
163
  target: 'es2020',
164
164
  // Don't bundle any dependencies, only bundle the config file itself
165
165
  packages: 'external',
166
- // External node_modules but allow inline of elit package
167
- external: (context: { path: string }) => {
168
- // Inline elit modules (they're in the same package)
169
- if (context.path.includes('node_modules/elit') || context.path.startsWith('elit/')) {
170
- return false;
171
- }
172
- // External everything else from node_modules
173
- if (context.path.includes('node_modules')) {
174
- return true;
175
- }
176
- return false;
177
- },
166
+ // Mark all Node.js built-ins as external
167
+ external: [
168
+ 'fs', 'path', 'os', 'crypto', 'http', 'https', 'stream', 'util',
169
+ 'url', 'querystring', 'events', 'buffer', 'child_process', 'cluster',
170
+ 'dgram', 'dns', 'net', 'tls', 'worker_threads', 'zlib', 'readline',
171
+ 'repl', 'vm', 'assert', 'console', 'timers', 'async_hooks', 'perf_hooks',
172
+ 'module', 'process', 'v8', 'inspector'
173
+ ],
178
174
  // Use the config directory as the working directory for resolution
179
175
  absWorkingDir: configDir,
180
- };
181
-
182
- await build(buildOptions);
176
+ });
183
177
 
184
178
  // Import the compiled config
185
179
  const config = await importConfigModule(tempFile);