| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,7 +143,7 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>( | |||
| 143 | 143 | function buildSetup() { | |
| 144 | 144 | return (plugin: UnpluginOptions) => { | |
| 145 | 145 | return (build: EsbuildPluginBuild, rawBuild: PluginBuild) => { | |
| 146 | - const context = createBuildContext(build) | ||
| 146 | + const context = createBuildContext(rawBuild) | ||
| 147 | 147 | const { onStart, onEnd, onResolve, onLoad, onTransform, initialOptions } = build | |
| 148 | 148 | ||
| 149 | 149 | const onResolveFilter = plugin.esbuild?.onResolveFilter ?? /.*/ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | import type { DecodedSourceMap, EncodedSourceMap } from '@ampproject/remapping' | |
| 2 | - import type { Loader, Location, Message, PartialMessage } from 'esbuild' | ||
| 2 | + import type { Loader, Location, Message, PartialMessage, PluginBuild } from 'esbuild' | ||
| 3 | 3 | import type { SourceMap } from 'rollup' | |
| 4 | - import type { EsbuildPluginBuild } from '.' | ||
| 5 | 4 | import type { UnpluginBuildContext, UnpluginContext, UnpluginMessage } from '../types' | |
| 6 | 5 | import { Buffer } from 'node:buffer' | |
| 7 | 6 | import fs from 'node:fs' | |
@@ -110,7 +109,7 @@ export function combineSourcemaps( | |||
| 110 | 109 | return map as EncodedSourceMap | |
| 111 | 110 | } | |
| 112 | 111 | ||
| 113 | - export function createBuildContext(build: EsbuildPluginBuild): UnpluginBuildContext { | ||
| 112 | + export function createBuildContext(build: PluginBuild): UnpluginBuildContext { | ||
| 114 | 113 | const watchFiles: string[] = [] | |
| 115 | 114 | const { initialOptions } = build | |
| 116 | 115 | return { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,6 @@ import type { AstNode, EmittedAsset, PluginContextMeta as RollupContextMeta, Plu | |||
| 6 | 6 | import type { Plugin as VitePlugin } from 'vite' | |
| 7 | 7 | import type { Compilation as WebpackCompilation, Compiler as WebpackCompiler, LoaderContext as WebpackLoaderContext, WebpackPluginInstance } from 'webpack' | |
| 8 | 8 | import type VirtualModulesPlugin from 'webpack-virtual-modules' | |
| 9 | - import type { EsbuildPluginBuild } from './esbuild' | ||
| 10 | 9 | ||
| 11 | 10 | export type { | |
| 12 | 11 | EsbuildPlugin, | |
@@ -48,7 +47,7 @@ export interface ExternalIdResult { id: string, external?: boolean } | |||
| 48 | 47 | ||
| 49 | 48 | export type NativeBuildContext = | |
| 50 | 49 | { framework: 'webpack', compiler: WebpackCompiler, compilation?: WebpackCompilation, loaderContext?: WebpackLoaderContext<{ unpluginName: string }> } | | |
| 51 | - { framework: 'esbuild', build: EsbuildPluginBuild } | | ||
| 50 | + { framework: 'esbuild', build: PluginBuild } | | ||
| 52 | 51 | { framework: 'rspack', compiler: RspackCompiler, compilation: RspackCompilation, loaderContext?: RspackLoaderContext } | | |
| 53 | 52 | { framework: 'farm', context: FarmCompilationContext } | |
| 54 | 53 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments