1 Star 0 Fork 309

zxc晓聪/md

forked from doocs/md 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 849 Bytes
一键复制 编辑 原始数据 按行查看 历史
ylb 提交于 2023-05-10 17:23 . chore: upgrade node version (#209)
const isProd = process.env.NODE_ENV === `production`
const crypto = require('crypto');
/**
* md4 algorithm is not available anymore in NodeJS 17+ (because of lib SSL 3).
* In that case, silently replace md4 by md5 algorithm.
*/
try {
crypto.createHash('md4');
} catch (e) {
const origCreateHash = crypto.createHash;
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts);
};
}
module.exports = {
lintOnSave: true,
publicPath: process.env.SERVER_ENV === `NETLIFY` ? `/` : `/md/`, // 基本路径, 建议以绝对路径跟随访问目录
configureWebpack: (config) => {
config.module.rules.push({
test: /\.(txt|md)$/i,
use: [
{
loader: `raw-loader`,
},
],
})
},
productionSourceMap: !isProd,
css: {
sourceMap: !isProd,
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xiaocon/md.git
git@gitee.com:xiaocon/md.git
xiaocon
md
md
main

搜索帮助