@afterpack/vue

Vue 3 plugin for AfterPack: obfuscate a Vue app's production JavaScript during the Vite build
1,424 2
Install
npm install @afterpack/vue
Latest Version:0.2.7
Vue:3
License:Apache-2.0
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: afterpack

@afterpack/vue

Obfuscate a Vue 3 app's production build. @afterpack/vue adds the AfterPack JavaScript obfuscator to a Vue 3 project built with Vite.

Install

npm install --save-dev @afterpack/vue

Usage

// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { afterpackVue } from "@afterpack/vue";

export default defineConfig({
  plugins: [vue(), afterpackVue()],
});

Every JavaScript chunk is obfuscated before Vite writes it, and a failed run fails the build.

afterpackVue(options) takes the same options as @afterpack/vite, for example afterpackVue({ preset: "hard", seed: "git" }).

The options you are most likely to set are preset, complexity, seed, identifiers.reserved for names that must stay as they are, paths.exclude for files to leave alone, and build.autorun to turn AfterPack off. Every other option is in the configuration reference. Options can also live in afterpack.json or in AFTERPACK_* environment variables.

Vue CLI projects build with webpack. Use @afterpack/webpack there. For Nuxt, use @afterpack/nuxt.

Pro

Without a key, AfterPack runs on your machine with the full pipeline at any preset. Set AFTERPACK_KEY in your environment and the same plugin builds in AfterPack's cloud instead, which adds per-region directives and two hardening transforms you can turn on: self-integrity, which detects edits to its own check table only, not edits elsewhere in your code, and comparison hardening. See AfterPack Pro.

Links

License

Apache-2.0. The engine it runs, @afterpack/core, has its own license.

Feedback

Questions, suggestions and bug reports: afterpack.dev/contact. You can also file a bug on GitHub Issues.

Related Packages

@vinxi/vite-plugin-inspect

Inspect the intermediate state of Vite plugins

8,820 1,699
webpack-plugin-codefend

Webpack plugin for code obfuscation based on Codefend

670 4
vite-plugin-vue-md

Simple and fast vue3 markdown vite plugin

365 1

Version History

Version Released License
0.2.7 Apache-2.0
0.2.6 Apache-2.0
0.2.5 Apache-2.0
0.2.4 Apache-2.0
0.2.3 Apache-2.0
Pre-releases (3)
Version Released License
0.2.0-rc.20260930T1421 Apache-2.0
0.1.0-rc.20260925T1355 Apache-2.0
0.1.0-rc.20260925T1347 Apache-2.0