Merge branch 'feature/优化打包' into develop

Former-commit-id: 889ec037eef580e0af1ac8e1fb5a382b4bf0872e [formerly 889ec037eef580e0af1ac8e1fb5a382b4bf0872e [formerly 889ec037eef580e0af1ac8e1fb5a382b4bf0872e [formerly 889ec037eef580e0af1ac8e1fb5a382b4bf0872e [formerly c47ccf5b9a707a3c4a06d5ffbb37fd6bef51a324 [formerly ce90a4fd04a373cbe42169f3232af40c079b5bca]]]]]
Former-commit-id: 4502d0eba46137905c5e931f94d7d75f8c1c238f
Former-commit-id: c907e06af73ef4f2cf81b847f748a505560b1728
Former-commit-id: 4fd6ba6b0ec6d39bb0b81408cd0f70bc799d4d6e [formerly 60136f558a4e34f3225ad74d955dbad577d7aca8]
Former-commit-id: d28c2ef656d9aa0ab49325f9af7ab2abe94c5c4c
Former-commit-id: 904d5e05a1f8423b9cec6d1ce5a4d7e0a1188abf
Former-commit-id: 7f9eaa852bee7117cc91f495c4044c85dbccc3f4
Former-commit-id: 4e1167b7fd78a235277ac14ece5f86f3ad00ec80
Former-commit-id: d897cc1050dbaf75816bae079c1534d5b46e315a
This commit is contained in:
liyang
2018-11-18 11:07:52 +08:00
5 changed files with 25 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ export default {
}
}, this.betterScrollOptions))
// 滚动时发出事件 并且统一返回的数据格式
this.BS.on('scroll', ({x, y}) => this.$emit('scroll', {
this.BS.on('scroll', ({ x, y }) => this.$emit('scroll', {
x: -x,
y: -y
}))

View File

@@ -17,4 +17,3 @@ export default {
}
}
</script>

View File

@@ -37,7 +37,7 @@
</el-table>
</template>
<script>
export default {
title: '筛选',
index: 13,

View File

@@ -17,4 +17,3 @@ export default {
}
}
</script>

View File

@@ -34,23 +34,30 @@ module.exports = {
// 解决 cli3 热更新失效 https://github.com/vuejs/vue-cli/issues/1559
config.resolve
.symlinks(true)
if (process.env.NODE_ENV === 'production') {
config.optimization
// 生产环境移除 console
// 其它优化选项 https://segmentfault.com/a/1190000008995453?utm_source=tag-newest#articleHeader12
.minimizer([
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log']
config
// 开发环境
.when(process.env.NODE_ENV === 'development',
// sourcemap不包含列信息
config => config.devtool('cheap-source-map')
)
// 非开发环境
.when(process.env.NODE_ENV !== 'development', config => {
config.optimization
.minimizer([
new UglifyJsPlugin({
uglifyOptions: {
// 移除 console
// 其它优化选项 https://segmentfault.com/a/1190000010874406
compress: {
warnings: false,
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log']
}
}
}
})
])
}
})
])
})
// markdown
config.module
.rule('md')