@chronotruck/yaml-loader

1.1.0 • Public • Published

@chronotruck/yaml-loader

YAML loader for Webpack. Allows importing YAML files as JS objects. Uses yaml internally.

Installation

npm install --save-dev @chronotruck/yaml-loader

Usage

// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.ya?ml$/,
        use: '@chronotruck/yaml-loader'
      }
    ]
  }
}
# file.yaml
---
config:
  js:
    key: test
hello: world
// application.js
import file from './file.yaml'

file.hello === 'world'

License

Forked from https://github.com/eemeli/yaml-loader and simplified for our own specific case.

MIT

Readme

Keywords

Package Sidebar

Install

npm i @chronotruck/yaml-loader

Weekly Downloads

4

Version

1.1.0

License

MIT

Unpacked Size

3.1 kB

Total Files

4

Last publish

Collaborators

  • williamdasilva
  • maffpool