Document the project structure and setup while excluding local dependencies and IDE settings. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
520 B
JavaScript
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"); },
|
|
})
|