UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

57 lines (54 loc) 1.99 kB
import * as esbuild from 'esbuild'; import { BuildOptions } from 'esbuild'; import { Entry } from '@storm-software/build-tools/types'; import { ResolvedOptions, ESBuildOverrideOptions, CompilerOptions, Context } from '../../types/index.cjs'; import '@babel/core'; import '@babel/types'; import '@storm-stack/types/shared/error'; import '@stryke/types/base'; import 'magic-string'; import '@storm-software/config-tools/types'; import '@stryke/types/configuration'; import 'hookable'; import '@storm-software/config/types'; import '@storm-software/esbuild/types'; import '@storm-software/unbuild/types'; import 'c12'; import 'unbuild'; import '@deepkit/type'; import '../../reflection-DTM1oT21.cjs'; import '@stryke/capnp'; import '@storm-stack/types/shared/log'; import '@stryke/env/get-env-paths'; import '@stryke/types/package-json'; import 'jest-worker'; import 'jiti'; import 'memfs'; import 'unimport'; import '../../types/tsconfig.cjs'; import '@stryke/types/tsconfig'; import 'typescript'; import '../../types/vfs.cjs'; import 'memfs/lib/volume'; import 'node:fs'; import 'unionfs'; /** * Options for the bundling process using esbuild. This type extends the ResolvedOptions type to include additional properties specific to the bundling process. */ type BundleOptions = Pick<ResolvedOptions, "external" | "noExternal" | "skipNodeModulesBundle"> & { entry?: Entry; outputPath?: string; alias?: Record<string, string>; override?: Partial<ESBuildOverrideOptions>; compiler?: CompilerOptions; }; /** * Bundles the specified entry points using esbuild. * * @param context - Base context for the bundling process. * @param bundleOptions - Additional options for the bundling process. * @returns The result of the bundling process. */ declare function bundle(context: Context, bundleOptions?: BundleOptions): Promise<esbuild.BuildResult<BuildOptions>>; declare type __ΩBundleOptions = any[]; export { type BundleOptions, type __ΩBundleOptions, bundle };