vite-mahlzeit-obfuscator
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

vite-mahlzeit-obfuscator

Install

Run the following command:

npm i vite-mahlzeit-obfuscator --save-dev

How to use

Make the following changes to vite.config.js:

import { defineConfig } from "vite";
import obfuscator from "vite-mahlzeit-obfuscator";

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

Then run the build command:

npm run build

If you just want to obfuscate specific files you can provide a regular expression, as follows:

import { defineConfig } from "vite";
import obfuscator from "vite-mahlzeit-obfuscator";

export default defineConfig({
  plugins: [
    obfuscator({
      includeRegEx: /^[\w,\s-]+\.[A-Za-z]{3}$/, // 👈 just an example
    }),
  ],
});

If you want to pass obfuscator options, you can do it like this:

import { defineConfig } from "vite";
import obfuscator from "vite-mahlzeit-obfuscator";

export default defineConfig({
  plugins: [
    obfuscator({
      options: {
        compact: true,
        simplify: true,
        stringArrayShuffle: true,
      },
    }),
  ],
});

Credits

This package was inspired by the following projects:

License

MIT

Package Sidebar

Install

npm i vite-mahlzeit-obfuscator

Weekly Downloads

5

Version

0.1.4

License

MIT

Unpacked Size

5.88 kB

Total Files

6

Last publish

Collaborators

  • fmendesdev