Skip to content

Latest commit

 

History

History

directory-plugin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@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