diff --git a/index.js b/index.js index 797eb2aa..d4da5818 100644 --- a/index.js +++ b/index.js @@ -4,14 +4,26 @@ module.exports = { name: require('./package').name, setupPreprocessorRegistry: function(type, registry) { - var VGet = require('./htmlbars-plugins/v-get'); + const plugin = this._buildPlugin(); - registry.add('htmlbars-ast-plugin', { + plugin.parallelBabel = { + requireFile: __filename, + buildUsing: '_buildPlugin', + params: {} + }; + + registry.add('htmlbars-ast-plugin', plugin); + }, + + _buildPlugin() { + const VGet = require('./htmlbars-plugins/v-get'); + + return { name: 'v-get', plugin: VGet, baseDir: function() { return __dirname; } - }); + }; } };