@wmrjs/directory-import
v0.3.0
Published
Allows you to import multiple files like this:
Downloads
84
Keywords
Readme
@wmrjs/directory-import
Allows you to import multiple files like this:
import files from 'dir:./pages';
console.log(files); // ['home.js', 'about.js']
Installation
yarn add @wmrjs/directory-import
## or
npm i --save @wmrjs/directory-import
Usage
Enable the plugin by importing (or pasting!) it into your wmr.config.js
:
import directoryPlugin from '@wmrjs/directory-import';
export default function (config) {
directoryPlugin(config);
}