0.0.16 • Published 2 months ago
@macropygia/vite-plugin-importer-invalidator v0.0.16
@macropygia/vite-plugin-importer-invalidator
English | 日本語
Vite plugin to invalidate the importers of the target file when the file is modified.
- This package is currently unstable.
- Breaking changes may occur without any notice, even if in patch releases.
- See CHANGELOG for changes.
- This package only works as ESM.
"type": "module"
is required in the package.json of the project using this plugin.
- Works on dev server
- The module of the target file must have its importers.
- The module here means the module in HMR of Vite.
Usage
// vite.config.js
import { defineConfig } from 'vite'
import vitePluginImporterInvalidator from '@macropygia/vite-plugin-importer-invalidator'
export default defineConfig({
plugins: [
vitePluginImporterInvalidator({
include: '**/_*.scss',
}),
],
})
Options
Parameter | Type | Default | Required |
---|---|---|---|
include | string \| string[] | Yes | |
exclude | string \| string[] | No |