1.1.0 • Published 2 years ago

vite-plugin-package-style v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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`;
          },
        },
      ],
    }),
  ],
});
1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago