Skip to content

chronotruck/yaml-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published