@afterpack/vue
v0.2.2
Published
Vue 3 plugin for AfterPack: obfuscate a Vue app's production JavaScript during the Vite build
Maintainers
Readme
@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/vueUsage
// 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 (anti-tamper) and comparison hardening. See AfterPack
Pro.
Links
- Vue setup guide
- Presets and protection levels
- How AfterPack compares to other obfuscators
- Protecting pricing logic
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.
