const?Timestamp?=?new?Date().getTime();
module.exports?=?{
??publicPath:?'./',?//?'/'history'模式
??outputDir:?'dist',?//?構(gòu)建時(shí)輸出目錄
??assetsDir:?'static',?//?靜態(tài)資源存放目錄
??filenameHashing:?true,?//?文件名哈希
??productionSourceMap:?false,
??indexPath:?'index.html',?//?文件輸出名
??pages:?{
????index:?{
??????entry:?'src/main.js',
??????template:?'./index.html',?//?模板文件
??????filename:?'index.html',
??????title:?'Signal?Supervisor',
??????chunks:?['chunk-vendors',?'chunk-common',?'index']
????}
??},
??configureWebpack:?{
????output:?{?//?輸出重構(gòu)??打包編譯后的?文件名稱??【模塊名稱.時(shí)間戳】
??????filename:?`static/js/[name].${Timestamp}.js`,
??????chunkFilename:?`static/js/[name].${Timestamp}.js`
????},
??},
??css:?{
????loaderOptions:?{
??????less:?{
????????//?若使用?less-loader@5,請(qǐng)移除?lessOptions?這一級(jí)帘撰,直接配置選項(xiàng)涕癣。
????????lessOptions:?{
??????????modifyVars:?{
????????????//?或者可以通過?less?文件覆蓋(文件路徑為絕對(duì)路徑)
????????????hack:?`true;?@import?"./src/assets/css/reset.less";`,
??????????},
????????},
??????},
? ? // 使用vant時(shí)對(duì)vant樣式的尺寸進(jìn)行忽略
????????postcss:?{
??????????????plugins:?[
??????????????????require('postcss-pxtorem')({?//?把px單位換算成rem單位
??????????????????????rootValue:?75,?//?換算的基數(shù)(設(shè)計(jì)圖750的根字體為75)
??????????????????????propList:?['*'],
??????????????????????exclude:?/vant/?//?設(shè)置不匹配項(xiàng)
??????????????????})
??????????????]
??????????},
????},
??}
};