Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 628 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 628 Bytes

@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);
}

Use it for automatic routes