esm-yaml-loader for webpack
ES Module YAML loader for webpack. Converts YAML to an ES Module. This is a fork of yaml-loader
.
Installation
npm install esm-yaml-loader
Usage
Simplest case would be:
// Import tree shakeable identifiers from yaml// or the default export for variable identifiers that aren't valid ES6
This loader is also useful for getting a valid JSON from YML. For example:
// webpack.config.jsmodule: loaders: test: /\.ya?ml$/ loader: 'esm-yaml-loader'
and then
// application.jsimport`./../data/.yaml`
License
MIT (http://www.opensource.org/licenses/mit-license.php)