Platinum sponsors

Going to production

Ship your animations without the editor.

The editor saves plain Anime.js code that imports nothing from the editor, so your animations run in production as they are. When a saved value uses a function such as stagger() or cubicBezier(), the save adds its import from 'animejs' to your file.

With Vite

The plugin loads the editor only with vite dev, and production builds never include it. There is nothing to remove, unless your code imports the editor to call editor.config(). Keep that code in a development only entry.

Without Vite

Remove the editor import from your production code, together with the docked mode script tag if you added one:

import '@animatorkit/editor'; // or '@animatorkit/editor-kit'
<script src="http://localhost:7348/__tweaks__/iframe.js"></script>

Keep both in a development only entry, so your production build never loads them.

editor.config() calls belong in the same development only code.

Previous
Next