Skip to content

Commit

Permalink
export Build And Serve class
Browse files Browse the repository at this point in the history
  • Loading branch information
windsonR committed Jan 23, 2024
1 parent 6a3ab37 commit 64a3f8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/html/VirtualHtmlPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {HistoryApiOptions} from "../history-api/types"
import { Serve } from './Serve'
import { Build } from './Build'

export default class VirtualHtmlPlugin implements Plugin {
export class VirtualHtmlPlugin implements Plugin {
name = 'vite-plugin-virtual-html'

_htmlOptions: HtmlPluginOptions
Expand Down
12 changes: 10 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import type {Plugin,} from 'vite'
import type {HtmlPluginOptions,} from './html/types'
import virtualHtmlPlugin from "./html/VirtualHtmlPlugin"
import { VirtualHtmlPlugin } from "./html/VirtualHtmlPlugin"
import type {HistoryApiOptions} from "./history-api/types"

export default (virtualHtmlOptions: HtmlPluginOptions & HistoryApiOptions): Plugin => {
return new virtualHtmlPlugin(virtualHtmlOptions)
return new VirtualHtmlPlugin(virtualHtmlOptions)
}

export {
VirtualHtmlPlugin,
}

export * from './html/Build'

export * from './html/Serve'

export * from './history-api/historyApiFallbackPlugin'

export * from './html/types'
Expand Down

0 comments on commit 64a3f8f

Please sign in to comment.