Skip to content

Commit 423d517

Browse files
committed
feat: 2020.08.14
1 parent c96a7b6 commit 423d517

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Cute-Webpack/Webpack插件开发.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@
3535

3636
问题简单,实际还是想试试开发 Webpack Plugin。
3737

38+
**注意**:这里还是想再说一下,这里插件的目的是为了给 JS 文件运行时动态增加随机数,即每次访问 `index.html` 时,引入 JS 脚本的 `script` 标签中 `src` 值的 JS 文件名后面都是随机数,如相同 `index.html` 中:
39+
40+
* 第 1 次打开时, `index.html` 引入 JS 脚本的 `script` 标签中 `src` 值为 `./index.js?15234598789`
41+
* 第 2 次打开时, `index.html` 引入 JS 脚本的 `script` 标签中 `src` 值为 `./index.js?15234599245`
42+
...
43+
44+
每次都将不同。
45+
46+
3847
## 二、基础知识
3948
Webpack 使用阶段式的构建回调,开发者可以引入它们自己的行为到 Webpack 构建流程中。<br />在开发之前,需要了解以下 Webpack 相关概念:
4049

0 commit comments

Comments
 (0)