packages/okam-build/lib/build/swan/init-wx2swan-processor.js
function initWxsProcessor(opts, defaultBabelProcessorName) {
    registerProcessor({
        name: 'wxs2filter',
        processor(file, options) {
            let content = file.content.toString();

            return {
                content: wxs2filter(content)
            };
        },
        extnames: ['wxs'],
        rext: 'filter.js'
    });
}
function initWxsProcessor(opts, defaultBabelProcessorName) {
    registerProcessor({
        name: 'wxs2filter',
        processor(file, options) {
            let content = file.content.toString();

            return {
                content: wxs2filter(content)
            };
        },
        extnames: ['wxs'],
        rext: 'filter.js'
    });
}
Initialize wxs js processor

@inner
@param {Object=} opts the options to init
@param {string=} opts.processor the builtin processor name, by default `babel`
@param {Array=} opts.plugins the processor plugins
@param {string} defaultBabelProcessorName default babel processor name