Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theknarf/simple-frontmatter-loader
A simple webpack loader for frontmatter. Turns frontmatter into exports.
https://github.com/theknarf/simple-frontmatter-loader
Last synced: about 2 months ago
JSON representation
A simple webpack loader for frontmatter. Turns frontmatter into exports.
- Host: GitHub
- URL: https://github.com/theknarf/simple-frontmatter-loader
- Owner: TheKnarf
- License: mit
- Created: 2018-08-05T20:44:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T09:22:56.000Z (about 2 years ago)
- Last Synced: 2024-11-18T01:39:54.153Z (about 2 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Frontmatter Loader
[![NpmVersion](https://img.shields.io/npm/v/simple-frontmatter-loader.svg)](https://www.npmjs.com/package/simple-frontmatter-loader)
A simple webpack loader for frontmatter. Turns frontmatter into exports.
```
npm install --save-dev simple-frontmatter-loader
```## Usage
Example webpack config:
```
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: [
'babel-loader',
'simple-frontmatter-loader',
]
},
{
test: /\.mdx?$/,
use: [
'babel-loader',
'@mdx-js/loader',
'simple-frontmatter-loader',
]
},
{
test: /\.html$/,
use: [{
loader: 'simple-frontmatter-loader',
options: {
use: [{ loader: 'html-loader', options: { exportAsEs6Default: 'es6' } }]
}
}]
},
]
},
```