robuild 0.1.11 → 0.1.12

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,3 +1,3 @@
1
- import { n as inheritConfig, r as performBuild, t as build } from "./build--tBh0Drv.mjs";
1
+ import { n as inheritConfig, r as performBuild, t as build } from "./build-C4bkK2Xj.mjs";
2
2
 
3
3
  export { inheritConfig, performBuild };
@@ -2007,6 +2007,34 @@ function convertTarget(target) {
2007
2007
  function convertExternal(external) {
2008
2008
  return external;
2009
2009
  }
2010
+ /**
2011
+ * Check if entries are auto-generated defaults (single entry pointing to src/index.ts)
2012
+ */
2013
+ function isDefaultEntries(entries) {
2014
+ if (!entries || entries.length !== 1) return false;
2015
+ const entry = entries[0];
2016
+ if (typeof entry === "string") return false;
2017
+ if (entry.type !== "bundle") return false;
2018
+ const input = entry.input;
2019
+ if (Array.isArray(input) && input.length === 1) return input[0] === "src/index.ts" || input[0].endsWith("/src/index.ts");
2020
+ if (typeof input === "string") return input === "src/index.ts" || input.endsWith("/src/index.ts");
2021
+ return false;
2022
+ }
2023
+ /**
2024
+ * Merge Vite config with robuild config
2025
+ * Vite entries take precedence over auto-generated default entries
2026
+ */
2027
+ function mergeViteConfig(viteConfig, config) {
2028
+ if (viteConfig.entries && viteConfig.entries.length > 0 && isDefaultEntries(config.entries)) return {
2029
+ ...viteConfig,
2030
+ ...config,
2031
+ entries: viteConfig.entries
2032
+ };
2033
+ return {
2034
+ ...viteConfig,
2035
+ ...config
2036
+ };
2037
+ }
2010
2038
 
2011
2039
  //#endregion
2012
2040
  //#region src/transforms/exports.ts
@@ -2195,7 +2223,7 @@ function createBuildResult(entries, startTime) {
2195
2223
  * Perform watch build using rolldown's built-in watch mode
2196
2224
  */
2197
2225
  async function performWatchBuild(config, ctx, startTime) {
2198
- const { performBuild } = await import("./build-CJFQ6BGl.mjs");
2226
+ const { performBuild } = await import("./build-BxwmFw-W.mjs");
2199
2227
  await performBuild(config, ctx, startTime);
2200
2228
  const bundleEntries = (config.entries || []).filter((entry) => {
2201
2229
  if (typeof entry === "string") return !entry.endsWith("/");
@@ -2215,7 +2243,7 @@ async function performWatchBuild(config, ctx, startTime) {
2215
2243
  */
2216
2244
  async function startRolldownWatch(config, ctx, bundleEntries) {
2217
2245
  logger.info("Watching for changes...");
2218
- const { inheritConfig } = await import("./build-CJFQ6BGl.mjs");
2246
+ const { inheritConfig } = await import("./build-BxwmFw-W.mjs");
2219
2247
  const watchConfigs = [];
2220
2248
  for (const rawEntry of bundleEntries) {
2221
2249
  let entry = typeof rawEntry === "string" ? parseEntryString(rawEntry) : rawEntry;
@@ -2339,10 +2367,7 @@ async function build(config) {
2339
2367
  let finalConfig = config;
2340
2368
  if (config.fromVite) {
2341
2369
  logger.verbose("Loading configuration from Vite config file");
2342
- finalConfig = {
2343
- ...await loadViteConfig(pkgDir),
2344
- ...config
2345
- };
2370
+ finalConfig = mergeViteConfig(await loadViteConfig(pkgDir), config);
2346
2371
  }
2347
2372
  finalConfig = normalizeTsupConfig(finalConfig);
2348
2373
  if (finalConfig.watch?.enabled) {
@@ -2,7 +2,7 @@
2
2
  var package_default = {
3
3
  name: "robuild",
4
4
  type: "module",
5
- version: "0.1.11",
5
+ version: "0.1.12",
6
6
  packageManager: "pnpm@10.11.1",
7
7
  description: "Zero-config ESM/TS package builder. Powered by Rolldown and Oxc",
8
8
  license: "MIT",
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { _ as configureLogger, t as build, v as logger } from "./_chunks/build--tBh0Drv.mjs";
2
+ import { _ as configureLogger, t as build, v as logger } from "./_chunks/build-C4bkK2Xj.mjs";
3
3
  import module from "node:module";
4
4
  import { colors } from "consola/utils";
5
5
  import process from "node:process";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { S as resolveCssOptions, a as createSkipNodeModulesPlugin, b as createLightningCSSPlugin, c as createNodeShimsPlugin, d as hasShebang, f as makeExecutable, g as hasGlobImports, h as createGlobImportPlugin, i as RobuildPluginManager, l as createShimsPlugin, m as nodeProtocolPlugin, o as DEFAULT_SHIMS_CONFIG, p as shebangPlugin, s as createBrowserShimsPlugin, t as build, u as SHEBANG_RE, v as logger, x as esbuildTargetToLightningCSS, y as createCssCodeSplitPlugin } from "./_chunks/build--tBh0Drv.mjs";
1
+ import { S as resolveCssOptions, a as createSkipNodeModulesPlugin, b as createLightningCSSPlugin, c as createNodeShimsPlugin, d as hasShebang, f as makeExecutable, g as hasGlobImports, h as createGlobImportPlugin, i as RobuildPluginManager, l as createShimsPlugin, m as nodeProtocolPlugin, o as DEFAULT_SHIMS_CONFIG, p as shebangPlugin, s as createBrowserShimsPlugin, t as build, u as SHEBANG_RE, v as logger, x as esbuildTargetToLightningCSS, y as createCssCodeSplitPlugin } from "./_chunks/build-C4bkK2Xj.mjs";
2
2
  import { t as defineConfig } from "./_chunks/config-BGTiuDLt.mjs";
3
3
  import { extname } from "node:path";
4
4
  import { readFile } from "node:fs/promises";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "robuild",
3
3
  "type": "module",
4
- "version": "0.1.11",
4
+ "version": "0.1.12",
5
5
  "packageManager": "pnpm@10.11.1",
6
6
  "description": "Zero-config ESM/TS package builder. Powered by Rolldown and Oxc",
7
7
  "license": "MIT",