@aegenet/ya-vite-banner
v1.0.2
Published
Yet Another Vite Banner
Downloads
184
Readme
@aegenet/ya-vite-banner
Yet Another Vite Banner
Like Banner Plugin for Webpack, but for Vite.
💾 Installation
yarn add @aegenet/ya-vite-banner@^1 -D
# or
npm i @aegenet/ya-vite-banner@^1 --save-dev
📝 Usage
With Vite
import { defineConfig } from 'vite';
import { yaViteBanner } from '@aegenet/ya-vite-banner';
import { resolve } from 'node:path';
export default async function config(options) {
return defineConfig({
plugins: [yaViteBanner({
banner: '#!/usr/bin/env node',
raw: true
// entryOnly: true,
// test: /^cli\.(mjs|umd.js)$/
})],
build: {
outDir: resolve(__dirname, `dist`),
lib: {
name: 'simple_banner',
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, `cli.js`),
fileName: 'cli',
},
}
});
}
Coverage
License
The MIT License - Copyright © 2024 Alexandre Genet.