File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/plugin-esbuild/src/helpers Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,13 @@ import { findFileName } from "@stryke/path/file-path-fns";
2323import defu from "defu" ;
2424import { build , BuildOptions , OutputFile } from "esbuild" ;
2525import { createEsbuildPlugin } from "unplugin" ;
26- import { EsbuildPluginContext } from "../types" ;
26+ import { EsbuildOptions , EsbuildPluginContext } from "../types" ;
2727import { resolveOptions } from "./resolve-options" ;
2828
29+ export type BundleOptions = Partial < EsbuildOptions > & {
30+ resolve ?: Partial < ResolveResolvedConfig > ;
31+ } ;
32+
2933/**
3034 * Bundle a type definition to a module.
3135 *
@@ -37,9 +41,7 @@ import { resolveOptions } from "./resolve-options";
3741export async function bundle (
3842 context : PluginContext ,
3943 file : string ,
40- overrides : Partial < BuildOptions > & {
41- resolve ?: Partial < ResolveResolvedConfig > ;
42- } = { }
44+ overrides : BundleOptions = { }
4345) : Promise < OutputFile > {
4446 const path = await context . fs . resolve ( file ) ;
4547 if ( ! path || ! context . fs . existsSync ( path ) ) {
Original file line number Diff line number Diff line change 1717 ------------------------------------------------------------------- */
1818
1919import { PluginContext } from "@powerlines/core" ;
20- import { bundle } from "@powerlines/plugin-esbuild/helpers/bundle" ;
2120import { parseTypeDefinition } from "@stryke/convert/parse-type-definition" ;
2221import { isSetString } from "@stryke/type-checks/is-set-string" ;
2322import {
2423 TypeDefinition ,
2524 TypeDefinitionParameter
2625} from "@stryke/types/configuration" ;
2726import { BuildOptions } from "esbuild" ;
27+ import { bundle , BundleOptions } from "./bundle" ;
2828
2929/**
3030 * Compiles a type definition to a module and returns the module.
@@ -37,7 +37,7 @@ import { BuildOptions } from "esbuild";
3737export async function resolveModule < TResult > (
3838 context : PluginContext ,
3939 type : TypeDefinitionParameter ,
40- overrides : Partial < BuildOptions > = { }
40+ overrides : BundleOptions = { }
4141) : Promise < TResult > {
4242 let typeDefinition ! : TypeDefinition ;
4343 if ( isSetString ( type ) ) {
You can’t perform that action at this time.
0 commit comments