提交 514d0d39 编写于 作者: G git_robot

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

const getCompilerOptions = require('./mp.js');
const getCompilerOptions = require('./mp.js')
const TAGS = {
br: 'view',
hr: 'view',
......
const path = require('path')
const crypto = require('crypto')
/**
* The MD4 algorithm is not available anymore in Node.js 17+ (because of library SSL 3).
* In that case, silently replace MD4 by the MD5 algorithm.
*/
try {
crypto.createHash('md4')
} catch (e) {
// console.warn('Crypto "MD4" is not supported anymore by this Node.js version');
const origCreateHash = crypto.createHash
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts)
}
}
const {
manifestPlatformOptions
} = require('./lib/env')
......
......@@ -106,16 +106,16 @@ module.exports = function chainWebpack (platformOptions, vueOptions, api) {
})
}
} else {
if (langRule.oneOf(type).uses.has('extract-css-loader')){
langRule.oneOf(type)
.use('extract-css-loader')
.tap(options => {
// 参考 https://github.com/vuejs/vue-cli/commit/b41ed76c5ce54c618587f24b9d14c35cf31a96d4
// 修复 部分平台 css 内的资源路径不正确,如uni-icons在百度小程序上引用的字体文件路径
if (options) options.publicPath = '/'
return options
})
}
if (langRule.oneOf(type).uses.has('extract-css-loader')) {
langRule.oneOf(type)
.use('extract-css-loader')
.tap(options => {
// 参考 https://github.com/vuejs/vue-cli/commit/b41ed76c5ce54c618587f24b9d14c35cf31a96d4
// 修复 部分平台 css 内的资源路径不正确,如uni-icons在百度小程序上引用的字体文件路径
if (options) options.publicPath = '/'
return options
})
}
}
langRule.oneOf(type)
.use('uniapp-preprocss')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册