作者:纯洁的老宁同志 | 来源:互联网 | 2023-10-13 11:23
看了一遍Webpack文档,对里面的名词有很大的疑惑;
单入口来说:--------其他的不懂,哈哈
1 2 3
| file是什么?最终生成的单js文件?
chunk是什么?和module有什么关系? |
Code Splitting
webpack has two types of dependencies in its dependency tree: sync and async. Async dependencies act as split points and form a new chunk. After the chunk tree is optimized, a file is emitted for each chunk.
这里的new chunk是指一个新的文件么,页面请求时返回new chunk?
a file for each chunk是指什么?一个chunk一个js文件?
Loaders
webpack can only process Javascript natively, but loaders are used to transform other resources into Javascript. By doing so, every resource forms a module.
every resource forms a module.每个资源形成一个模块,这个模块时一个chunk么,是一个单独的请求么?
希望大家帮助我这只迷途的小羊……