marmotte / vite/lib
vite/lib
Type Aliases
LibConfigPluginOptions
LibConfigPluginOptions =
object
Defined in: src/vite/lib.ts:12
Properties
entries?
optionalentries?:PathFilter
Defined in: src/vite/lib.ts:20
A filter to automatically add files from UserVitePluginOptions.sourceDir to entries.
If not defined and no entry is manually added by the user in its vite config, <sourceDir>/index.ts will be used
Example
/(?<!\.d)(?<!\.test)(?<!\.test-d)\.ts$/LibPluginOptions
LibPluginOptions =
LibConfigPluginOptions&object
Defined in: src/vite/lib.ts:69
Type Declaration
docs?
optionaldocs?:Options|false
Options for the Docs plugin, use false to disable
dts?
optionaldts?:WithNoDefaults<PluginOptions>
Options for the vite-plugin-dts (will be merged with defaults)
externals?
optionalexternals?:ExternalsOptions
Options for the rollup-plugin-node-externals
typedoc?
optionaltypedoc?:Options|false
Options for the TypeDoc plugin, use false to disable (disabled by default if docs: false)
Functions
Lib()
Lib(
options?):Plugin<any>[]
Defined in: src/vite/lib.ts:83
Configures vite to build a library (can be node, browser or isomorphic)
Parameters
options?
LibPluginOptions = {}
Returns
Plugin<any>[]
LibConfig()
LibConfig(
options):Plugin
Defined in: src/vite/lib.ts:30
Low-level plugin that sets the Vite build options for library mode. Discovers entry points from sourceDir using the LibConfigPluginOptions.entries filter, or falls back to <sourceDir>/index.ts when no entries or manual build.lib.entry are provided.
Used internally by Lib. Prefer Lib() for most use cases.
Parameters
options
Returns
Plugin