{"id":20881,"library":"yml-loader","title":"yml-loader","description":"YAML loader for webpack that imports .yml files as JSON objects. Version 2.1.0 is the latest stable release. This loader supports multiple documents via the `multiDocument` option and key blacklisting via `keysToRemove` to exclude sensitive keys from output. It is commonly used in webpack configurations to load YAML configuration files. The package is unmaintained since 2019 and relies on `js-yaml` for parsing. Alternatives like `yaml-loader` offer more active maintenance and broader compatibility with webpack 4+.","status":"maintenance","version":"2.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/nkt/yml-loader","tags":["javascript","yaml","json","remove","keys","blacklist","loader","webpack","webpack-loader"],"install":[{"cmd":"npm install yml-loader","lang":"bash","label":"npm"},{"cmd":"yarn add yml-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add yml-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core YAML parsing dependency. Used to load and parse YAML files.","package":"js-yaml","optional":false},{"reason":"Peer dependency; loader is designed for webpack bundler.","package":"webpack","optional":true}],"imports":[{"note":"Loader is used in webpack config, not in application code. Import syntax shown is illustrative; actual usage is via webpack loader string.","wrong":"const yml = require('yml-loader')","symbol":"yml-loader","correct":"import yml from 'yml-loader'"},{"note":"Webpack 1 uses `loaders` with `loader`; webpack 2+ uses `rules` with `use`. This package documentation still shows webpack 1 style.","wrong":"module.exports = { module: { loaders: [ { test: /\\.yml$/, loader: 'yml' } ] } }","symbol":"webpack config","correct":"module.exports = { module: { rules: [ { test: /\\.yml$/, use: 'yml-loader' } ] } }"}],"quickstart":{"code":"// In webpack config\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.ya?ml$/,\n        use: [\n          {\n            loader: 'yml-loader',\n            options: {\n              keysToRemove: ['private_key']\n            }\n          }\n        ]\n      }\n    ]\n  }\n};\n\n// Then in your code\nimport config from './config.yml';\nconsole.log(config); // outputs parsed YAML as JS object","lang":"javascript","description":"Shows how to configure webpack to load YAML files using yml-loader with key removal option."},"warnings":[{"fix":"Use `module.rules` array with `use` property for webpack 2+.","message":"Webpack 1 loader syntax is incompatible with webpack 2+. Use `rules` and `use` instead of `loaders` and `loader`.","severity":"breaking","affected_versions":">=0.0.0 <2.0.0"},{"fix":"Consider migrating to `yaml-loader` (npm: yaml-loader) which is actively maintained.","message":"Package is unmaintained since 2019; no updates for webpack 5 compatibility.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'2.1.0':16 '2019':59 '4':82 'activ':75 'altern':68 'blacklist':33,88 'broader':78 'common':44 'compat':79 'configur':48,52 'document':26 'exclud':37 'file':11,53 'import':9 'javascript':83 'js':64 'js-yaml':63 'json':13,85 'key':32,39,87 'keystoremov':35 'latest':19 'like':69 'load':50 'loader':3,5,23,72,89,93 'mainten':76 'multidocu':29 'multipl':25 'object':14 'offer':73 'option':30 'output':41 'packag':55 'pars':67 'releas':21 'reli':61 'remov':86 'sensit':38 'sinc':58 'stabl':20 'support':24 'unmaintain':57 'use':45 'version':15 'via':27,34 'webpack':7,47,81,90,92 'webpack-load':91 'yaml':4,51,65,71,84 'yaml-load':70 'yml':2,10 'yml-loader':1","created_at":"2026-04-25T11:25:27.922338+00:00","updated_at":"2026-04-25T11:25:27.922338+00:00","problems":[{"fix":"Install with `npm install --save-dev yml-loader`.","cause":"Loader not installed or not in node_modules.","error":"Module not found: Error: Can't resolve 'yml-loader'"},{"fix":"Install `js-yaml` with `npm install --save-dev js-yaml`.","cause":"Missing peer dependency `js-yaml`.","error":"Module build failed: Error: Cannot find module 'js-yaml'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/nkt/yml-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/yml-loader","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}