Skip to content

Commit fe0a97e

Browse files
committed
重新启用清理build目录的script;build出来的文件带上chunkhash以便清除掉过期的浏览器cache
1 parent e9d3992 commit fe0a97e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

src/public-resource/less/base.less

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@
4040
@import "@{components-dir}/_modal.less";
4141

4242
/* 标签页 */
43-
@import "@{components-dir}/_tab.less";
43+
@import "@{components-dir}/_tab.less";
44+
45+
body {
46+
display: block;
47+
}

webpack-config/output.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ var dirVars = require('./base/dir-vars.config.js');
22
module.exports = {
33
path: dirVars.buildDir,
44
publicPath: '/',
5-
filename: '[name]/entry.js', // [name]表示entry每一项中的key,用以批量指定生成后文件的名称
6-
chunkFilename: '[id].bundle.js',
5+
filename: '[name]/entry.[chunkhash].js', // [name]表示entry每一项中的key,用以批量指定生成后文件的名称
6+
chunkFilename: '[id].[chunkhash].bundle.js',
77
};

webpack.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('./npm-scripts/before-build.script');
2+
13
module.exports = {
24
entry: require('./webpack-config/entry.config.js'),
35

webpack.dev.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('./npm-scripts/before-build.script');
2+
13
module.exports = {
24
entry: require('./webpack-config/entry.config.js'),
35

0 commit comments

Comments
 (0)