Skip to content

Instantly share code, notes, and snippets.

@agileago
Last active August 29, 2018 07:19
Show Gist options
  • Save agileago/a2e47fa83659be2601e7bf2949a1adaa to your computer and use it in GitHub Desktop.
Save agileago/a2e47fa83659be2601e7bf2949a1adaa to your computer and use it in GitHub Desktop.
一些常用函数
/**
* 过滤掉不受支持的emoji表情
* @param str
* @returns {*}
*/
export function replaceUndisplayEmoji (str) {
if (!str) return str
return str.replace(/[\ue000-\ue537]/g, '')
}
module.exports = {
baseUrl: './',
outputDir: undefined,
assetsDir: undefined,
runtimeCompiler: undefined,
productionSourceMap: false,
parallel: undefined,
css: undefined,
filenameHashing: false,
chainWebpack: config => {
config.plugins.delete('preload')
config.plugins.delete('prefetch')
config
.plugin('html')
.tap(args => {
args[0].minify = false
return args
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment