2.1.3 • Published 9 months ago
vite-plugin-lib v2.1.3
vite-plugin-lib
Vite plugin for build configuration, automatic aliases, and type declarations.
Features
- Automatic aliases based on
tsconfig.json
- Automatic build configuration
- Type declaration generation based on vite-plugin-dts.
Installation
yarn add -D vite-plugin-lib
Usage
This highly opinionated all-in one Vite plugin enables automatic alias configuration based on tsconfig.json
paths, library export configuration, and type declaration generation.
Aliases
import { defineConfig } from 'vite'
import { tsconfigPaths } from 'vite-plugin-lib'
export default defineConfig({
plugins: [tsconfigPaths()],
})
Library
The library
plugin includes the alias
plugin, configures build settings, and generates .d.ts
files.
import { defineConfig } from 'vite'
import { library } from 'vite-plugin-lib'
export default defineConfig({
plugins: [
library({
entry: 'src/index.ts', // file name determines output file names, default is 'src/index.ts'
formats: ['es'], // optional, default is ['es']
name: 'YourGlobalUMDName', // optional if format does not include 'umd' or 'iife'
external: ['some-package'], // optional, default is all node_modules and builtin modules
manifest: 'package.json', // relative path to package.json, default is package.json
}),
],
})
2.1.3
9 months ago
2.1.2
9 months ago
2.1.1
11 months ago
2.0.13
11 months ago
2.0.11
1 year ago
2.0.12
11 months ago
2.0.10
1 year ago
2.1.0
11 months ago
2.0.9
1 year ago
2.0.8
1 year ago
2.0.7
1 year ago
2.0.6
1 year ago
2.0.5
1 year ago
2.0.4
1 year ago
2.0.3
2 years ago
1.5.0
2 years ago
1.2.3
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago