@godxiaoji/rollup-plugin-require-context
v1.0.1
Published
rollup-plugin for webpack requrie-context
Downloads
8
Maintainers
Readme
rollup-plugin-require-context
Rollup plugin for resolving webpack require-context.
PS: 组件库需要用到这个插件,但是原来的作者已经不维护好久了,积累了一些bug,就把pull requests的合并一下上传。
Usage
import requireContext from 'rollup-plugin-require-context';
export default {
input: 'main.js',
output: {
file: 'bundle.js',
format: 'iife'
},
plugins: [
requireContext()
]
};
Options
exclude
Type: string | string[]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.
include
Type: string | string[]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.
extensions
Type: string[]
Default: ['.js']
Search for extensions other than .js in the order specified.