vite-plugin-package-style
v1.1.0
Published
Vite plugin to automatically import styles from packages
Downloads
4
Maintainers
Readme
vite-plugin-package-style
Vite plugin to automatically import styles from packages
Install
npm i -D vite-plugin-package-style
Usage
// vite.config.ts
import { defineConfig } from 'vite';
import packageStyle from 'vite-plugin-package-style';
export default defineConfig({
plugins: [
packageStyle({
rules: [
{
include: ['foobar', '@foo/*'],
exclude: ['@foo/bar-*'],
resolveStyle: (pkg) => {
return `${pkg}/dist/index.css`;
},
},
],
}),
],
});