我正在使用RequireJS,骨干样板和布局管理器,JamJS来帮助管理包,一切都在开发中运行良好,但是当我尝试创建带有连接文件的生产版本时它不起作用.
看起来shim我的配置可能没有加载.例如,我在控制台中遇到的错误是Uncaught TypeError: Cannot set property 'cookie' of undefined,因此jQuery没有作为jquery.cookie的依赖项加载.这是我的应用配置:
// Set the require.js configuration for your application.
require.config({
// Initialize the application with the main application file and the JamJS
// generated configuration file.
deps: ["../vendor/jam/require.config", "main"],
paths: {
baseUrl : '/',
config : "config",
// JavaScript folders.
api : "libs/api",
app : "app",
// Libraries.
almond : "../vendor/jam/js/libs/almond",
engagement : "libs/engagement",
environment : "libs/environment",
jquery : "../vendor/jam/jquery/jquery",
jqueryui : "../vendor/js/libs/jquery-ui-1.9.1.custom.min",
"jquery-cookie" : "../vendor/jam/jquery-cookie/jquery.cookie",
chosen : …Run Code Online (Sandbox Code Playgroud) javascript jquery requirejs backbone-boilerplate backbone-layout-manager