@leafage/toolkit
Version:
The React Server Side Render Framework
56 lines (52 loc) • 1.54 kB
JavaScript
/**
* @leafage/toolkit v1.3.2
*
* Copyright (c) Leafage.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
// builder配置
var builder = {
// 访问根路径
publicPath: '/',
// 文件名
filenames: {
// { isDev, isClient, isServer }
app: function app(_ref) {
var isDev = _ref.isDev;
return isDev ? '[name].js' : 'static/js/[contenthash:10].js';
},
chunk: function chunk(_ref2) {
var isDev = _ref2.isDev;
return isDev ? '[name].js' : 'static/js/[contenthash:10].js';
},
css: function css(_ref3) {
var isDev = _ref3.isDev;
return isDev ? '[name].css' : 'static/css/[contenthash:10].css';
},
image: function image(_ref4) {
var isDev = _ref4.isDev;
return isDev ? '[path][name][ext]' : 'static/image/[contenthash:10][ext]';
},
font: function font(_ref5) {
var isDev = _ref5.isDev;
return isDev ? '[path][name][ext]' : 'static/font/[contenthash:10][ext]';
},
media: function media(_ref6) {
var isDev = _ref6.isDev;
return isDev ? '[path][name][ext]' : 'static/media/[contenthash:10][ext]';
},
cssModuleName: function cssModuleName(_ref7) {
var isDev = _ref7.isDev;
return isDev ? '[name]__[local]--[hash:base64:8]' : '_[hash:base64:10]';
}
},
// watch options
watch: {}
};
exports.default = builder;