一覧へ戻る
jacksteamdev/rollup-plugin-empty-dir(新しいタブで開きます)
主要言語: JavaScript
Automatically empty output.dir before writing a new bundle.
- star 数
- 2
- watcher 数
- 0
- fork 数
- 1
- issue 数
- 8
- 最終更新
- 2023/03/03
主要言語: JavaScript
Automatically empty output.dir before writing a new bundle.
Automatically empty the output.dir folder before writing a new bundle. Useful for code splitting, where chunks with different hashes can accumulate from multiple builds.
Use this plugin with the bundler Rollup.
$ npm i rollup-plugin-empty-dir -D
// rollup.config.js
import { emptyDir } from 'rollup-plugin-empty-dir'
export default {
input: 'src/index.js',
output: {
dir: 'dist',
format: 'esm',
},
plugins: [emptyDir()]
}This Rollup plugin has no options, it just empties the dir folder during the build process, right before Rollup writes any files.
TypeScript definitions are included, so no need to install an additional @types library!