guido
Version:
基于webpack4的一键式开发工具,集成handlebars、雪碧图、SVG Sprite、自定义资源注入等方式
41 lines (35 loc) • 900 B
JavaScript
;
const paths = require('../config/paths');
const getCacheIdentifier = require('./getCacheIdentifier');
const getENV = require('./env').getENV;
module.exports = {
default: function(config) {
return {
root: config.context,
compact: false,
cacheDirectory: paths.appCache,
cacheCompression: true,
cacheIdentifier: getCacheIdentifier(getENV(), [
'babel-preset-zuzuche',
]),
sourceMaps: config.devtool !== false,
inputSourceMap: config.devtool !== false,
highlightCode: true,
};
},
dependencies: function(config) {
return {
root: config.context,
compact: false,
cacheDirectory: paths.appCache,
cacheCompression: true,
cacheIdentifier: getCacheIdentifier(getENV(), [
'babel-preset-zuzuche',
]),
sourceMaps: false,
inputSourceMap: false,
highlightCode: true,
sourceType: 'unambiguous',
};
},
};