elit 3.1.9 → 3.2.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/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.1.9",
1438
+ version: "3.2.0",
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,20 +1702,30 @@ 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
- await build3({
1705
+ const buildOptions = {
1706
1706
  entryPoints: [configPath],
1707
1707
  bundle: true,
1708
1708
  format: "esm",
1709
- platform: "node",
1709
+ platform: "neutral",
1710
1710
  outfile: tempFile,
1711
1711
  write: true,
1712
1712
  target: "es2020",
1713
- // Bundle everything including elit/* so config can use elit modules
1714
- // Only mark Node.js built-ins as external
1715
- external: ["node:*"],
1713
+ // Don't bundle any dependencies, only bundle the config file itself
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
+ },
1716
1725
  // Use the config directory as the working directory for resolution
1717
1726
  absWorkingDir: configDir
1718
- });
1727
+ };
1728
+ await build3(buildOptions);
1719
1729
  const config = await importConfigModule(tempFile);
1720
1730
  await safeCleanup(tempFile);
1721
1731
  return config;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OA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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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elit",
3
- "version": "3.1.9",
3
+ "version": "3.2.0",
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
@@ -152,20 +152,34 @@ async function loadConfigFile(configPath: string): Promise<ElitConfig> {
152
152
 
153
153
  // Bundle the TypeScript config with proper path resolution
154
154
  const configDir = dirname(configPath);
155
- await build({
155
+
156
+ const buildOptions: any = {
156
157
  entryPoints: [configPath],
157
158
  bundle: true,
158
159
  format: 'esm',
159
- platform: 'node',
160
+ platform: 'neutral',
160
161
  outfile: tempFile,
161
162
  write: true,
162
163
  target: 'es2020',
163
- // Bundle everything including elit/* so config can use elit modules
164
- // Only mark Node.js built-ins as external
165
- external: ['node:*'],
164
+ // Don't bundle any dependencies, only bundle the config file itself
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
178
  // Use the config directory as the working directory for resolution
167
179
  absWorkingDir: configDir,
168
- });
180
+ };
181
+
182
+ await build(buildOptions);
169
183
 
170
184
  // Import the compiled config
171
185
  const config = await importConfigModule(tempFile);