Skip to content

Commit

Permalink
feat: improve types exports, close #6
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Nov 12, 2024
1 parent a12ce02 commit d2ad9d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './core/mockCompiler'
export * from './core/mockMiddleware'
export * from './core/mockWebsocket'
export * from './rspack'
export * from './types'
5 changes: 3 additions & 2 deletions src/rsbuild.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { RsbuildConfig, RsbuildPlugin } from '@rsbuild/core'
import type { ProxyOptions } from '@rsbuild/core/dist-types/types'
import type { ProxyOptions, RsbuildConfig, RsbuildPlugin } from '@rsbuild/core'
import type * as http from 'node:http'
import type { MockServerPluginOptions } from './types'
import { createServer } from 'node:http'
Expand All @@ -16,6 +15,8 @@ import { mockWebSocket } from './core/mockWebsocket'
import { rewriteRequest } from './core/requestRecovery'
import { resolvePluginOptions } from './core/resolvePluginOptions'

export * from './types'

export function pluginMockServer(options: MockServerPluginOptions = {}): RsbuildPlugin {
return {
name: 'plugin-mock-server',
Expand Down

0 comments on commit d2ad9d1

Please sign in to comment.