We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
比如:
var $ = require('juqery'); var Bootstrap = require('bootstrap');
这样写会报错,因为Bootstrap需依赖jquery; 请问这样的情况如何处理?
The text was updated successfully, but these errors were encountered:
可以参考一下 https://github.com/hefangshi/modjs-autoload-demo
比如我们在页面中只要require('main')
https://github.com/hefangshi/modjs-autoload-demo/blob/master/index.html#L28-L30
在页面加载时,就会先加载main.js中声明的各种依赖模块
https://github.com/hefangshi/modjs-autoload-demo/blob/master/modules/main.js#L3-L9
另外你是否是直接独立使用的mod.js?mod.js是不能独立使用的,必须配合后端静态资源管理方案,如fis-plus, jello等,或者纯前端的静态资源管理方案fis-pure,这些方案会根据你的依赖关系进行模块加载。
Sorry, something went wrong.
你尝试把 jQuery 挂载在 window 变量下 $ = require('juqery');
No branches or pull requests
比如:
var $ = require('juqery');
var Bootstrap = require('bootstrap');
这样写会报错,因为Bootstrap需依赖jquery;
请问这样的情况如何处理?
The text was updated successfully, but these errors were encountered: