edge-fe-meta-loader

1.0.1 • Public • Published

edge-fe-meta-loader for Webpack

JS-YAML loader for webpack.

Installation

npm install edge-fe-meta-loader

Usage

Webpack documentation on using loaders.

Using the loader inline:

import doc from 'edge-fe-meta-loader!./file.yml';
// => returns a javascript object. see https://github.com/nodeca/js-yaml

Or using the loader via Webpack configuration (recommended):

// webpack.config.js
module: {
  rules: [{
    test: /\.mt\.ya?ml$/,
    use: 'edge-fe-meta-loader',
  }]
}

In contrast, this loader loads YAML files as JavaScript objects using the un-eval library. This allows YAML value types otherwise disallowed in JSON such as Infinity, RegExp, Function, etc. See js-yaml's supported YAML types

Package Sidebar

Install

npm i edge-fe-meta-loader

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

2.1 kB

Total Files

3

Last publish

Collaborators

  • fan.ding