UNPKG

648 BJavaScriptView Raw
1const { bind } = require('./util');
2
3module.exports = {
4 apply(argv, options) {
5 let result = bind(argv.moduleBind, undefined, options); // eslint-disable-line no-undefined
6 result = bind(argv.moduleBindPre, 'pre', result);
7 result = bind(argv.moduleBindPost, 'post', result);
8
9 return result;
10 },
11
12 flags: {
13 'module-bind': {
14 desc: 'Bind an extension to a loader',
15 type: 'string'
16 },
17 'module-bind-post': {
18 desc: 'Bind an extension to a postLoader',
19 type: 'string'
20 },
21 'module-bind-pre': {
22 desc: 'Bind an extension to a preLoader',
23 type: 'string'
24 }
25 },
26
27 name: 'Modules'
28};