javascriptwebpackvelocity.js

import velocity.ui always returns 'Velocity must be loaded first. Aborting.'


I'm trying to include the Velocity UI pack using the following:

import Velocity from 'velocity-animate';
import 'velocity-animate/velocity.ui.js';

and it always returns the message "Velocity must be loaded first. Aborting"

I have tried all sorts of variants to include the module, and nothing. I'm lost, what is the proper way to include, import or require the UI pack?


Solution

  • If you're using the V2 beta then currently the UI-Pack is non-functional. I'm working on trying to update the build part of things, without having much time for it.

    Unlike previous versions it's now only going to have animation definitions within it, all code is within Velocity itself, and the most recent builds have all of the animations directly within them (that will change in v2.1 as soon as I get the time to figure out why RollupJS is breaking).

    For now I'd suggest commenting out that line, and when keep an eye on updates - it is the correct way to do it when it gets enabled again (I'll try to remember to update this comment when that happens)!