我有一个可以扩展 Backbone 的模型。 模式并将其用于我所有的模型中。 我想把它包含在要求中. config. paths 中, 这样在每个模块中我就可以定义( [强调, 骨干, 基模 ), 功能(... ) 。 但是, 要求无法装入它 。
我检查了所有路径, 当我在我的定义函数... 模型/混ixins/ base model 内给文件一个直接路径时, 我检查了所有路径, 它就起作用了 。
难道不可能在路径内包括一个模块吗?
我有一个可以扩展 Backbone 的模型。 模式并将其用于我所有的模型中。 我想把它包含在要求中. config. paths 中, 这样在每个模块中我就可以定义( [强调, 骨干, 基模 ), 功能(... ) 。 但是, 要求无法装入它 。
我检查了所有路径, 当我在我的定义函数... 模型/混ixins/ base model 内给文件一个直接路径时, 我检查了所有路径, 它就起作用了 。
难道不可能在路径内包括一个模块吗?
如果它不起作用, 您是否设置了您的路径 需要. config? 至少您必须设置基本URL 字段 :
require.config({
baseUrl: /js/ ,
paths:{
text: lib/3rdparty/text
}
});
如果您有长路, 您可以设置别名路径 。
I am using requireJS for the first time. I got it working fine then came to optimize the files to minify and concatenate and now I get the error "Uncaught TypeError: undefined is not a function" the ...
What s the difference between using Require.JS amd simply creating a <script> element in the DOM? My understanding of Require.JS is that it offers the ability to load dependencies, but can this ...
In my system, I have a number of "classes" loaded in the browser each a separate files during development, and concatenated together for production. As they are loaded, they initialize a property on a ...
I have a number of JavaScript "classes" each implemented in its own JavaScript file. For development those files are loaded individually, and for production they are concatenated, but in both cases I ...
I am trying to use RequireJS to load browser modules and I came into an interesting problem. I have 3 modules named a, b and c having these simple source code: a.js define([ ./b , ./c ], function(...
I ve just begun to work with Require.JS and I m a bit unclear on the appropriate cases in which it should be used, as well as the correct way to use it in those cases. Here s how I currently have ...
I have been beating my head against this for quite a while. I m loading about 60 script files that need to respect a certain dependency structure. Loading these normally in requirejs does not work, ...
We develop an application in an embedded environment. It is a high level computing environment with a complete webbrowser on top of a busybox Linux system. The only exception is that the system has a ...