Skip to content
New issue

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

在Grunt 构建项目后,模块之间的引用问题. #40

Open
handyxuefeng opened this issue Oct 12, 2013 · 0 comments
Open

在Grunt 构建项目后,模块之间的引用问题. #40

handyxuefeng opened this issue Oct 12, 2013 · 0 comments

Comments

@handyxuefeng
Copy link

目录结构如下
dirctory
其中tweet.js文件中内容为:
define(function (require, exports) {
var cookie = require("cookie"); //cookie key的配置在下面的router.js文件见下图
return {
init: function () {
$("#txtUser").val("user" + new Date().getTime()).css("width", "600px");
$("#txtPwd").val("pwd" + new Date().getTime()).css("width", "600px");
$.cookie("user", "jackie");
}
};
});

router.js的路由配置
d1
然后当我在dos命令行中使用grunt build-script打包的过程中出现了如下错误:
error

我的目的就是想使用seajs的形式来引用其它.js 文件,如果在tweet.js中不写 var cookie = require("cookie");是没有任何错误,请问改如何改进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant