Skip to content

Commit

Permalink
新增hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Taoja committed Sep 25, 2019
1 parent d0b652a commit 37b96ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function build (options) {
})
} else {
compiler.run((err, stats) => {
// console.log(stats.toJson())
// console.log(compiler)
})
}
}
Expand Down
8 changes: 2 additions & 6 deletions config/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ const resolve = require('../lib/resolve')
const config = require('../lib/config')
const {type} = require('../lib/args')

/**
* 输出入口配置
* @param {String|undefined} e 传入的离线包名称,如果传入则筛选出指定包名下的文件入口对象
*/
var io = {}
if (type === 'multi') {
io = {
entry: entrys,
output: {
path: resolve(config.default.output),
filename: `[name].js`,
filename: `[name]-[hash].js`,
publicPath: '../../'
}
}
Expand All @@ -22,7 +18,7 @@ if (type === 'multi') {
entry: entrys,
output: {
path: resolve(config.default.output),
filename: `[name].js`
filename: `[name]-[hash].js`
}
}
}
Expand Down
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37b96ca

Please sign in to comment.