Skip to content

🥶 vite-plugin-stripper

The first need was to remove @BackendMethod from your browser bundle for remult.

Examples

vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'
import { stripper } from 'vite-plugin-stripper'
export default defineConfig({
plugins: [
// To strip `@BackendMethod` from your browser bundle
stripper({ strip: ['BackendMethod'] }),
sveltekit(),
],
})

Installation

Terminal window
npm i -D vite-plugin-stripper

Advanced configuration

stripper({
strip: [
{ decorator: 'BackendMethod' },
{
decorator: 'Entity',
args_1: [
{ fn: 'backendPrefilter' },
{ fn: 'backendPreprocessFilter' },
{ fn: 'sqlExpression' },
// {
// fn: 'saved',
// excludeEntityKeys: ['users']
// }
],
},
],
})