|
- let filePath = ''
- let Timestamp = ''
- //编译环境判断,可以根据不同环境来做相应的配置
- if (process.env.UNI_PLATFORM === 'h5') {
- filePath = 'static/js/'
- Timestamp = '.' + new Date().getTime();
-
- }
- module.exports = {
- lintOnSave: true,
- // 配置路径别名
- configureWebpack: {
- devServer: {
- disableHostCheck: true
- },
- output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】
- filename: `${filePath}[name]${Timestamp}.js?v=1.0.2`,
- chunkFilename: `${filePath}[name]${Timestamp}.js`
- },
- }
- }
|