I am making a behavior plugin. All works well when the export is un-minified. If I minify the export then I receive the following error:
TypeError: q is not a constructor[/code:37gsw7j8]
The "q" corresponds to "behavior_ctor" in the c2runtime.js when un-minified:
behavior_plugin = new behavior_ctor(this);
behavior_plugin.my_types = ; // types using this behavior
behavior_plugin.my_instances = new cr.ObjectSet(); // instances of this behavior
I hope that this is enough info. If anyone has any idea where I should focus my efforts then that would be very much appreciated. I imagine that I am missing something obvious here... I am about to embark on a long process of rebuilding my plugin from scratch to see what causes the export to break. But I need to sleep!
Solved. Apparently you cannot preserve the name of your plugin like this: ["myplugin"].