RepoPilotOpen in app →

vuejs-templates/webpack

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.

Mixed

Stale — last commit 3y ago

weakest axis
Use as dependencyMixed

last commit was 3y ago; no CI workflows detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isMixed

last commit was 3y ago; no CI workflows detected

  • 34+ active contributors
  • MIT licensed
  • Tests present
  • Stale — last commit 3y ago
  • Concentrated ownership — top contributor handles 57% of recent commits
  • No CI workflows detected
What would change the summary?
  • Use as dependency MixedHealthy if: 1 commit in the last 365 days
  • Deploy as-is MixedHealthy if: 1 commit in the last 180 days

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/vuejs-templates/webpack?axis=fork)](https://repopilot.app/r/vuejs-templates/webpack)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/vuejs-templates/webpack on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: vuejs-templates/webpack

Generated by RepoPilot · 2026-05-07 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/vuejs-templates/webpack shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Stale — last commit 3y ago

  • 34+ active contributors
  • MIT licensed
  • Tests present
  • ⚠ Stale — last commit 3y ago
  • ⚠ Concentrated ownership — top contributor handles 57% of recent commits
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live vuejs-templates/webpack repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/vuejs-templates/webpack.

What it runs against: a local clone of vuejs-templates/webpack — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in vuejs-templates/webpack | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch develop exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 1192 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>vuejs-templates/webpack</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of vuejs-templates/webpack. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/vuejs-templates/webpack.git
#   cd webpack
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of vuejs-templates/webpack and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "vuejs-templates/webpack(\\.git)?\\b" \\
  && ok "origin remote is vuejs-templates/webpack" \\
  || miss "origin remote is not vuejs-templates/webpack (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify develop >/dev/null 2>&1 \\
  && ok "default branch develop exists" \\
  || miss "default branch develop no longer exists"

# 4. Critical files exist
test -f "template/build/webpack.base.conf.js" \\
  && ok "template/build/webpack.base.conf.js" \\
  || miss "missing critical file: template/build/webpack.base.conf.js"
test -f "template/package.json" \\
  && ok "template/package.json" \\
  || miss "missing critical file: template/package.json"
test -f "template/src/main.js" \\
  && ok "template/src/main.js" \\
  || miss "missing critical file: template/src/main.js"
test -f "template/config/index.js" \\
  && ok "template/config/index.js" \\
  || miss "missing critical file: template/config/index.js"
test -f "template/build/utils.js" \\
  && ok "template/build/utils.js" \\
  || miss "missing critical file: template/build/utils.js"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 1192 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1162d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/vuejs-templates/webpack"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

A Webpack + vue-loader project template scaffold for Vue 2.0 applications that bundles hot-reload development, ESLint linting, Jest/Karma unit testing, and CSS extraction into a single generator-based setup (activated via vue init webpack). It solves the boilerplate problem for developers starting Vue 2 SPAs without manually assembling Webpack configs, loaders, and dev tooling. Generator template structure: root meta.js drives the vue-cli scaffolding logic; template/ directory contains the actual project layout that gets copied to new projects. Build configs live in template/build/ (separate webpack base, dev, prod, test configs); app source in template/src/; scenarios in scenarios/*.json define different setup flavors (minimal, full, full-karma-airbnb). Documentation in docs/SUMMARY.md provides per-feature deep-dives.

👥Who it's for

Vue 2.0 developers (frontend engineers, full-stack teams) who want a production-ready SPA scaffold with zero manual Webpack configuration. More specifically: developers using vue-cli v2.* who need hot-reload development and automated testing without understanding Webpack internals.

🌱Maturity & risk

This template is deprecated as of vue-cli 3.0 release (noted explicitly in README). While it was the official template for vue-cli 2.*, it is no longer actively maintained — the maintainers explicitly state they will only fix major issues, not develop further. The codebase is stable but frozen; production apps built from it remain functional but won't receive feature updates.

This is a template frozen at vue-cli 2.x era; Webpack 2-era config patterns (pre-v4 optimization strategies) are outdated. Dependency freshness is unknown without commit date visibility, but the README warns the develop branch 'can contain bugs or not build at all.' Single-maintainer (vue team) risk is moderate since it's in the official vuejs-templates organization. No active migration path to vue-cli 3+ is documented in this repo.

Active areas of work

No active development visible. This is a maintenance-only state post-vue-cli 3 release. The repo exists primarily for legacy project compatibility and to accept pull requests fixing critical bugs in already-scaffolded projects.

🚀Get running

To use this template to scaffold a new Vue project: npm install -g vue-cli && vue init webpack my-project && cd my-project && npm install && npm run dev. To work on the template itself (contributing), clone this repo, modify files in template/ or meta.js, and test via vue init <local-path> test-project.

Daily commands: In a scaffolded project (after npm install): npm run dev starts the webpack dev server on port 8080 with hot reload. For production: npm run build. For testing: npm run unit (unit tests) or npm run e2e (Nightwatch e2e tests).

🗺️Map of the codebase

  • template/build/webpack.base.conf.js — Core Webpack configuration defining module rules, entry points, and output settings that all other configs extend from.
  • template/package.json — Project dependencies and npm scripts including dev server, build, and test commands that orchestrate the entire build pipeline.
  • template/src/main.js — Application entry point where Vue instance is initialized and mounted to the DOM.
  • template/config/index.js — Central configuration file controlling dev server, build output paths, CSS extraction, and environment-specific settings.
  • template/build/utils.js — Shared Webpack utility functions for CSS loader chains, style extraction, and file path resolution used across all build configs.
  • meta.js — Vue CLI template metadata defining prompts, file filtering logic, and template initialization behavior for project generation.
  • template/build/webpack.dev.conf.js — Development Webpack configuration with hot module replacement, source maps, and dev server integration for rapid iteration.

🛠️How to make changes

Add a New Vue Component

  1. Create a new .vue file in template/src/components/ directory with template, script, and style sections (template/src/components/NewComponent.vue)
  2. Import the component in the parent component or router file (template/src/router/index.js)
  3. Use the component in templates with camelCase naming matching the filename (template/src/App.vue)

Add a New Route

  1. Create the corresponding Vue component in template/src/components/ (template/src/components/NewPage.vue)
  2. Add route definition in the router configuration with path, component, and name properties (template/src/router/index.js)
  3. Update navigation in App.vue or add router-link elements to navigate to the new route (template/src/App.vue)

Add a Unit Test for a Component

  1. Create a new .spec.js file in template/test/unit/specs/ mirroring the component name (template/test/unit/specs/NewComponent.spec.js)
  2. Import the component and test framework (Vue Test Utils, Karma or Jest) (template/test/unit/index.js)
  3. Write test cases using describe/it blocks following the pattern in HelloWorld.spec.js (template/test/unit/specs/HelloWorld.spec.js)

Configure Build Output & CSS Extraction

  1. Modify output path, filename patterns, and asset handling in the main config file (template/config/index.js)
  2. Production config will automatically extract CSS to separate files using the settings from index.js (template/build/webpack.prod.conf.js)
  3. Verify CSS loader chains and extract plugin configuration are properly defined (template/build/utils.js)

🔧Why these technologies

  • Webpack — Industry-standard module bundler with powerful plugin ecosystem for tree-shaking, code splitting, and asset optimization essential for production Vue.js applications.
  • Vue Loader — Enables single-file components (.vue) combining template, logic, and scoped styles in one file, improving component reusability and maintainability.
  • Babel — Transpiles ES6+ syntax to ES5 for broader browser compatibility while allowing developers to use modern JavaScript features.
  • Hot Module Replacement (HMR) — Provides near-instant feedback during development by injecting code changes without full page reload, dramatically improving developer experience.

⚖️Trade-offs already made

  • Vue CLI v2 template instead of native Webpack setup

    • Why: Abstracts away complex Webpack configuration while maintaining full customization capability through vue-cli prompts.
    • Consequence: Easier onboarding for beginners but less transparent about underlying build process; now deprecated in favor of Vue CLI v3.
  • Separate dev, prod, and test Webpack configs

    • Why: Allows environment-specific optimizations (HMR for dev, minification for prod, sourcemaps for test) without runtime overhead.
    • Consequence: More files to maintain; shared logic extracted to utils.js and base config to reduce duplication.
  • Optional Karma vs Jest for unit testing

    • Why: Provides flexibility; Karma runs tests in real browsers (better integration testing) while Jest is faster and built-in to Node.
    • Consequence: Template must support both configurations; developers must choose one approach.
  • ESLint and Babel configuration exposed in template

    • Why: Allows developers to customize linting rules and transpilation targets to match project requirements without ejecting.
    • Consequence: More configuration files (.eslintrc.js, .babelrc) to understand and maintain.

🚫Non-goals (don't propose these)

  • Server-side rendering (SSR) — template is client-side only
  • State management abstraction — does not prescribe Vuex or alternative; up to developer
  • Component library or UI framework — template provides only minimal example components
  • Backend API integration — no built-in API client; proxy config available but not enforced
  • Docker or containerization support — not included in template scaffolding

🪤Traps & gotchas

No explicit .env file handling documented in file list, but template/config/dev.env.js, prod.env.js, test.env.js exist; you must understand these override NODE_ENV. The dev server defaults to port 8080 but auto-increments if taken (non-obvious behavior for CI/Docker). Webpack 2 era config: async/await in build scripts requires Babel; modern async syntax not natively supported in Node at template generation time. The vue-cli version pinned in package.json (^2.8.1) is critical; upgrading to vue-cli 3+ breaks this template entirely. extract-text-webpack-plugin v3 has known issues with concurrent builds; single-threaded builds required. No lockfile strategy documented (package-lock.json present but .npmrc absent), so npm version variance could affect installs.

🏗️Architecture

💡Concepts to learn

  • Hot Module Replacement (HMR) — This template's killer feature for development; HMR preserves component state during edits, reducing dev cycle time from seconds to milliseconds. Implemented via webpack-dev-middleware in webpack.dev.conf.js.
  • Single File Components (SFC) — The core Vue 2 pattern enabled by vue-loader; you define template, script, and scoped styles in a single .vue file. This template's entire build pipeline exists to process these.
  • Code splitting & dynamic imports — Webpack 2+ supports import() dynamic imports for route-level or component-level code splitting; this template supports it but not explicitly documented. Critical for production bundle optimization.
  • Webpack loaders and entry/output — Understanding how template/build/webpack.base.conf.js chains loaders (babel-loader, vue-loader, style-loader, css-loader) is essential to add new asset types (SVG, fonts, WASM) to projects scaffolded from this template.
  • CSS extraction and PostCSS — Production builds extract CSS via extract-text-webpack-plugin and process it through PostCSS (.postcssrc.js). Development bundles CSS in-line for HMR. Understanding this dual path is crucial for debugging style issues.
  • Babel transpilation and .babelrc — The template uses Babel 6 to transpile ES2015+ to ES5; template/.babelrc controls which presets and plugins apply. This is invisible unless you need to adjust target browser support or use experimental proposals.
  • Asset fingerprinting and long-term caching — Production builds hash asset filenames (e.g., app.a1b2c3d4.js) in webpack.prod.conf.js to enable aggressive browser caching. Understanding this is crucial for production deployment and CDN strategies.
  • vuejs/vue-cli — The current official Vue project scaffolding tool (v3+); this template was the primary template for vue-cli v2 and is superseded by vue-cli 3's built-in setup.
  • vuejs-templates/webpack-simple — A sibling minimal template in the same vuejs-templates organization; simpler alternative to this full-featured template for smaller projects.
  • vuejs-templates/pwa — A sibling Progressive Web App template also in vuejs-templates; extends this webpack template with PWA manifests and service worker tooling.
  • vuejs/vue-loader — The core Webpack loader that powers Single File Component processing in this template; understanding vue-loader internals is essential for modifying build behavior.
  • webpack-contrib/extract-text-webpack-plugin — The Webpack plugin used in webpack.prod.conf.js to extract CSS into separate files; critical for understanding production CSS handling in this template.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add unit tests for template/build/utils.js webpack utilities

The template/build/utils.js file contains critical webpack configuration helpers (likely including styleLoaders, assetsPath, etc.) that are used across webpack.base.conf.js, webpack.dev.conf.js, and webpack.prod.conf.js, but there are no unit tests covering these utilities. This is high-value since any refactoring of build utilities could break the entire build pipeline. Tests should cover edge cases for style loader configuration, asset path generation, and environment-specific logic.

  • [ ] Create template/test/unit/specs/build-utils.spec.js
  • [ ] Add tests for all exported functions from template/build/utils.js
  • [ ] Test style loader generation for different file types (css, sass, less, stylus)
  • [ ] Test asset path generation across different environments (dev/prod)
  • [ ] Integrate tests into the existing test runner (Jest or Karma configuration in template/test/unit/)

Add GitHub Actions CI workflow to replace deprecated CircleCI setup

The repo uses CircleCI (see .circleci/config.yml) which is aging infrastructure. GitHub Actions is now the standard for GitHub repos and would modernize the CI/CD pipeline. A contributor could create a .github/workflows/test.yml that runs linting, unit tests, and e2e tests on pull requests and pushes, providing immediate feedback without requiring external CI services.

  • [ ] Create .github/workflows/ci.yml with Node.js matrix testing (12.x, 14.x, 16.x)
  • [ ] Add step to run template/test/unit/ tests using configured test runner
  • [ ] Add step to run template/test/e2e/ tests using Nightwatch
  • [ ] Add step to run ESLint on template/ directory using template/.eslintrc.js
  • [ ] Include build verification step (template/build/build.js) to catch build regressions

Document and add tests for meta.js template generation scenarios

The meta.js file is the core configuration for vue-cli template generation, and scenarios/ directory contains preset configurations (full.json, minimal.json, full-karma-airbnb.json), but there's no documentation or tests validating that these scenarios actually generate valid projects. Add validation tests to ensure each scenario in scenarios/index.js produces a working project structure.

  • [ ] Create test/scenarios.spec.js to programmatically test each scenario generates correct structure
  • [ ] Verify each scenario in scenarios/ produces template/ with all required files and configurations
  • [ ] Test that generated package.json from each scenario is valid and npm-installable
  • [ ] Add documentation in docs/structure.md explaining each scenario and when to use it
  • [ ] Validate template/build/webpack.*.conf.js files are syntactically valid for each scenario

🌿Good first issues

  • Add unit test examples to template/test/unit/ for the default src/App.vue component; currently the testing scaffold is sparse and new contributors often fail to set up tests correctly.
  • Document the migration path from this deprecated template to vue-cli 3 in docs/migration.md; users scaffolding with this template deserve a guide to upgrade without rewriting.
  • Add a template/.env.example file and document environment variable injection in docs/env.md with concrete examples (API_URL, etc); currently the config/dev.env.js pattern is opaque.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 2985030 — Update README.md (LinusBorg)
  • 3473bb1 — Update README.md (LinusBorg)
  • 4ffcccb — Fix typos (#1312) (diogosalazar)
  • b654847 — Docs: formatting/typo fixes (#1254) (cristianl)
  • b1c0f98 — Fix two documentation typos (#1248) (fossil12)
  • 50d01f9 — Fixed typo in linter.md (#1263) (salvadornico)
  • 073b021 — Fixing babel-eslint >=8 not working with babel 6 (at least on Windows) (#1283) (queteparece)
  • d8fb864 — Bump template version (1.3.1) (LinusBorg)
  • e1ba1ea — change circleci node image to 6.12.3 to ensure node 6 compat. (LinusBorg)
  • 8ce0da4 — replace object rest spread with Object.assign for node6 compat. (fix #1245) (LinusBorg)

🔒Security observations

This is a deprecated Vue CLI 2.x template with significant security concerns primarily stemming from its age and lack of maintenance. The project uses outdated dependencies (vue-cli 2.8.1

  • High · Deprecated vue-cli Version — package.json, README.md. The template uses vue-cli 2.x which is deprecated and no longer actively maintained. This means security patches and updates are unlikely, potentially exposing the project to known vulnerabilities in dependencies. Fix: Migrate to vue-cli 3.x or higher. Consider using @vue/cli which is actively maintained and includes security updates.
  • High · Outdated Dependency Versions — package.json. The package.json specifies 'vue-cli': '^2.8.1', which is a very old version from around 2018. This version and its transitive dependencies likely contain known security vulnerabilities that have been patched in newer releases. Fix: Update to the latest stable version of @vue/cli (currently v5.x). Review and audit all transitive dependencies using 'npm audit'.
  • Medium · Missing package-lock.json Integrity — package-lock.json. While package-lock.json exists, the presence of very old dependencies suggests this lock file may not have been updated in years. This increases the risk of supply chain attacks and makes it difficult to reproduce builds securely. Fix: Run 'npm install' and 'npm audit fix' to update dependencies to secure versions. Regularly update and commit lock files.
  • Medium · Missing Security Hardening in Build Config — template/build/webpack.prod.conf.js, template/build/webpack.dev.conf.js. Build configuration files (webpack.dev.conf.js, webpack.prod.conf.js) likely lack modern security best practices such as Content Security Policy (CSP) headers, subresource integrity (SRI), or secure default headers. Fix: Add security headers configuration. Implement Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, and other security headers in webpack plugins.
  • Medium · Potential XSS Vulnerability in Vue Template — template/src/components/HelloWorld.vue, template/src/App.vue. Vue templates may be vulnerable to XSS attacks if user input is rendered without proper escaping. The presence of .vue files and HelloWorld.vue template suggests potential for unsafe rendering patterns. Fix: Ensure all user-supplied data is properly escaped using Vue's built-in escaping. Avoid using v-html with untrusted content. Use v-text or text interpolation {{ }} instead.
  • Medium · Missing Environment Variable Security — template/config/dev.env.js, template/config/prod.env.js, template/config/test.env.js. Configuration files (config/dev.env.js, config/prod.env.js) may contain sensitive environment variables. Environment-specific secrets should never be committed to version control. Fix: Use .env files (in .gitignore) for environment variables. Never commit actual secrets. Use process.env with proper defaults and document required environment variables.
  • Low · Outdated Test Framework Dependencies — template/test/unit/karma.conf.js, template/test/unit/jest.conf.js. Test configurations reference Karma and potentially old versions of testing libraries. These outdated test frameworks may have known vulnerabilities. Fix: Update testing dependencies (Jest, Karma, Nightwatch) to latest stable versions. Review test configuration files for security issues.
  • Low · Missing Security Documentation — docs/. The documentation does not appear to include security guidelines or best practices for developers using this template. Fix: Add a SECURITY.md file with vulnerability reporting guidelines and security best practices for projects using this template.
  • Low · No Security Headers in Static Files — template/static/. Static assets directory exists but likely lacks proper security configuration (caching headers, CORS policies, etc.). Fix: Configure proper HTTP security headers for static assets. Implement cache-busting and integrity checks for critical assets.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · vuejs-templates/webpack — RepoPilot