okam-build
Version:
The build tool for Okam develop framework
42 lines (33 loc) • 812 B
JavaScript
/**
* @file Weixin mini program build task manager
* @author sparklewhy@gmail.com
*/
;
const BuildManager = require('../BuildManager');
const {updateReferProcessorInfo} = require('../../processor/type');
class BuildWxAppManager extends BuildManager {
/**
* @override
*/
getModulePathKeepExtnames() {
return ['.wxs'];
}
/**
* @override
*/
initProcessor(buildConf) {
super.initProcessor(buildConf);
updateReferProcessorInfo('filter', this.defaultBabelProcessorName);
}
/**
* @override
*/
getFilterTransformOptions() {
let opts = super.getFilterTransformOptions();
if (opts) {
opts.format = 'commonjs';
}
return opts;
}
}
module.exports = BuildWxAppManager;