Registry / web-framework / vue-cli-plugin-yaml

vue-cli-plugin-yaml

JSON →
library1.0.2jsnpmunverified

Vue CLI plugin that adds YAML support to Webpack via yaml-loader. Version 1.0.2, no recent updates. Allows importing .yml/.yaml files in Vue projects with zero configuration, supporting both default and named exports. Differentiates from manual webpack config by integrating seamlessly with Vue CLI's plugin system, making it trivial to add YAML loading to any Vue CLI project.

npm install vue-cli-plugin-yaml
INSTALL
IMPORT
SIG · VUE-CLI-PLUGIN-YAM
V
vue-cli-plugin-yaml
web-frameworkjavascriptv1.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import config from './config.yml'
Default import yields the full YAML object as a plain JS object.
named
import { apiKey } from './config.yml'
Named imports for direct access to top-level keys. Requires the YAML file to be a flat object.
require
const config = require('./config.yml')
CommonJS require works in Vue CLI projects if using webpack's CJS compatibility.

Shows basic installation and usage: importing YAML files as JS objects with default and named exports.

// Install // yarn add --dev vue-cli-plugin-yaml // src/config.yml // apiKey: abcd // src/main.js import config from './config.yml' console.log(config) // { apiKey: 'abcd' } import { apiKey } from '@/config' console.log(apiKey) // 'abcd'
Debug
Known issues
deprecatedVue CLI (and its plugin system) is in maintenance mode, with Vue 3 preferring Vite. New projects should avoid using this plugin.
fix
Migrate to Vite-based Vue 3 projects and use Vite's built-in YAML support or a plugin like vite-plugin-yaml.
affects: >=0.0.0
gotchaNamed imports only work for top-level keys in the YAML file. Nested objects or arrays cannot be directly destructured.
fix
Use default import and access nested properties manually: import config from './config.yml'; config.nested.key
affects: >=0.0.0
gotchaThe plugin may conflict with other YAML-related webpack configurations if both are present.
fix
Ensure no duplicate yaml-loader rules are added manually.
affects: >=0.0.0
Errors
Common errors & fixes
Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.
Webpack doesn't have a loader configured for .yml or .yaml files.
fix
Install and invoke vue-cli-plugin-yaml: vue add yaml
Cannot find module 'yaml-loader'
yaml-loader is not installed (should be a peer dependency).
fix
Run: yarn add -D yaml-loader
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
vue-cli-plugin-yaml — npm install vue-cli-plugin-yaml · libregistry