Closed gcharnock closed 8 years ago
The issue was that this error message to todo with how the plugin is eventually called in the client code, not the Plugin.call itself. I was following an outdated tutorial when I realised it was out of date. I hadn't updated the client code.
In your Brocfile change this:
var plugin = require('my-plugin');
To something like:
var Plugin = MyPlugin('src');
...
var plugin = new Plugin(tree);
Closing issue. Hopefully this will be a helpful google-crumb for someone else.
Trying to run the sample plugin against
broccoli-plugin-1.2.1
fails with the following error:My guess is that the
if (!(this instanceof Plugin)) throw new TypeError('Missing
newoperator')
broke the example when it was added?(I've attached the sample as it was when I encountered this error below).