Files
tulin-code/webpack-2026-09-04/2. webpack的基本结构.js
Whale-Fall-Code 418a0411d1 Initialize encryption and JavaScript reverse-engineering study repository
Document the project structure and setup while excluding local dependencies and IDE settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-09 23:25:05 +08:00

20 lines
520 B
JavaScript

/*
* webpack 的基本结构有两种(数组结构 / 对象结构)
*
* !(function ( 形参) { 加载器 }) ([模块1, 模块2, ...])
* !(function ( 形参) { 加载器 }) ({"1": 模块1, "2": 模块2, ...})
* */
!(function (function_location) {
function inner_run_func(key) {
return function_location[key].call()
}
inner_run_func("1")
})({
"1": function () { console.log("模块1"); },
"2": function () { console.log("模块2"); },
"3": function () { console.log("模块3"); },
})