requirejs define a module
https://requirejs.org/docs/api.html#define
Define a Module § 1.3
A module is different from a traditional script file in that it defines a well-scoped object that avoids polluting the global namespace. It can explicitly list its dependencies and get a handle on those dependencies without needing to refer to global objects, but instead receive the dependencies as arguments to the function that defines the module. Modules in RequireJS are an extension of the Module Pattern, with the benefit of not needing globals to refer to other modules.
The RequireJS syntax for modules allows them to be loaded as fast as possible, even out of order, but evaluated in the correct dependency order, and since global variables are not created, it makes it possible to load multiple versions of a module in a page.
(If you are familiar with or are using CommonJS modules, then please also see CommonJS Notes for information on how the RequireJS module format maps to CommonJS modules).
There should only be one module definition per file on disk. The modules can be grouped into optimized bundles by the optimization tool.
相关文章
- Understanding RequireJS for Effective JavaScript Module Loading
- hub.Module/task=‘token-cls‘
- node-load module
- centos7下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named ‘_ctypes‘的解决办法
- AttributeError: module ‘urllib‘ has no attribute ‘urlopen‘错误
- Nginx: ngx_http_geoip_module
- ModuleNotFoundError: No module named ‘setuptools_rust‘
- Error: Cannot find module 'gulp-clone'问题的解决
- Pod install 之后 no such module
- No module named zope.interface error的解决
- Module-Zero之组织单元(OU)管理【新增】
- Module Zero之用户管理
- 创建 kylin Module/Cube
- TS之namespace与module
- 关于webpack配置webpack-dev-server 报错问题。Error: Cannot find module 'webpack-cli/bin/config-yargs'
- windows下流媒体nginx-rmtp-module服务器搭建及java程序调用fmpeg将rtsp转rtmp直播流【转】
- The server is busy right now, module operations are not possible at this time, please try again late
- ModuleNotFoundError: No module named 'distutils.util'