{"id":26630,"library":"wallaby-vue-compiler","title":"Wallaby Vue Compiler","description":"Wallaby.js compiler for Vue single-file components enabling code coverage display. v1.0.6 stable, low update frequency. Requires vue-template-compiler as peer dep and accepts a separate compiler (e.g., Babel) for script section compilation. Different from other Vue compilers by integrating directly with Wallaby's coverage instrumentation pipeline.","status":"active","version":"1.0.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install wallaby-vue-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add wallaby-vue-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add wallaby-vue-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Compiles Vue template strings from .vue files; required as peer dependency.","package":"vue-template-compiler","optional":false}],"imports":[{"note":"The module exports a function that must be invoked with a compiler argument immediately. ESM import will not work due to its CommonJS nature.","wrong":"import compiler from 'wallaby-vue-compiler';","symbol":"default","correct":"const compiler = require('wallaby-vue-compiler')(wallaby.compilers.babel({}));"},{"note":"No named exports exist; destructuring will result in undefined.","wrong":"const { wallabyVueCompiler } = require('wallaby-vue-compiler');","symbol":"default (module.exports)","correct":"const wallabyVueCompiler = require('wallaby-vue-compiler');"},{"note":"The package is CommonJS only. ESM import may fail in some environments; use require() or dynamic import.","wrong":"","symbol":"default (ESM attempt)","correct":"import wallabyVueCompiler from 'wallaby-vue-compiler';"}],"quickstart":{"code":"// wallaby.js\nmodule.exports = function (wallaby) {\n  return {\n    files: ['src/**/*.vue', 'src/**/*.js'],\n    tests: ['test/**/*.spec.js'],\n    compilers: {\n      '**/*.js': wallaby.compilers.babel({}),\n      '**/*.vue': require('wallaby-vue-compiler')(wallaby.compilers.babel({}))\n    },\n    env: {\n      type: 'node'\n    }\n  };\n};","lang":"javascript","description":"Configures Wallaby.js to compile .vue files with the Vue compiler, using Babel for script sections."},"warnings":[{"fix":"Consider using @vue/compiler-sfc for Vue 3 or Vue 2.7+ projects.","message":"Package relies on vue-template-compiler which is deprecated since Vue 2.7.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always call require('wallaby-vue-compiler')(scriptCompiler) in the compilers config.","message":"The compiler must be invoked immediately with a script compiler argument; forgetting this will cause a runtime error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Invoke the default export as a factory: const vueCompiler = require('wallaby-vue-compiler')(wallaby.compilers.babel({}));","message":"The module exports a function, not a class or object; using it as a normal compiler will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For Vue 3 projects, use a different coverage tool or Wallaby's native Vue 3 support.","message":"Only works with Vue 2 due to vue-template-compiler peer dependency.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'accept':30 'babel':35 'code':13 'compil':3,5,25,33,39,44 'compon':11 'coverag':14,51 'dep':28 'differ':40 'direct':47 'display':15 'e.g':34 'enabl':12 'file':10 'frequenc':20 'instrument':52 'integr':46 'javascript':54 'low':18 'peer':27 'pipelin':53 'requir':21 'script':37 'section':38 'separ':32 'singl':9 'single-fil':8 'stabl':17 'templat':24 'updat':19 'v1.0.6':16 'vue':2,7,23,43 'vue-template-compil':22 'wallabi':1,49 'wallaby.js':4","created_at":"2026-05-01T13:50:59.043451+00:00","updated_at":"2026-05-01T13:50:59.043451+00:00","problems":[{"fix":"Run npm install vue-template-compiler@^2.6.10 --save-dev","cause":"Missing peer dependency vue-template-compiler.","error":"Error: Cannot find module 'vue-template-compiler'"},{"fix":"Use require('wallaby-vue-compiler')(wallaby.compilers.babel({})) instead of just require('wallaby-vue-compiler')","cause":"Importing the module but forgetting to call it as a function with a compiler argument.","error":"TypeError: wallabyVueCompiler is not a function"},{"fix":"Pass wallaby.compilers.something({}) as the first argument.","cause":"The argument passed to the factory is not a valid Wallaby compiler object.","error":"Error: Compiler is not set or is not a valid Wallaby compiler"}],"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":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/wallaby-vue-compiler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}