7.6.2 • Published 4 years ago
react-static-plugin-source-filesystem v7.6.2
react-static-plugin-source-filesystem
A React-Static plugin that adds support for recursively importing routes from a directory
This means that any files in your projects pages/ directory will be turned into static routes.
Example:
- src/pages/index.js - would produce a route with the path of
/and the template set tosrc/pages/index.js - src/pages/about/us.js - would produce a route with the page of
/about/usand the template set tosrc/pages/about/us.js
Installation
In an existing react-static site run:
$ yarn add react-static-plugin-source-filesystemThen add the plugin to your static.config.js with a valid location directory in the options:
...
import path from 'path'
...
export default {
plugins: [
[
'react-static-plugin-source-filesystem',
{
location: path.resolve('./src/pages'),
},
],
],
}7.6.2
4 years ago
7.6.1
4 years ago
7.5.3
5 years ago
7.5.1
5 years ago
7.5.0
5 years ago
7.4.2
5 years ago
7.4.1
5 years ago
7.4.0
5 years ago
7.3.0
5 years ago
7.2.3
6 years ago
7.2.2
6 years ago
7.2.0
6 years ago
7.1.0
6 years ago
7.0.10
7 years ago
7.0.8
7 years ago
7.0.0
7 years ago
7.0.0-beta.5
7 years ago
7.0.0-beta.0
7 years ago