requirejs可以使用cdn中的插件构建单个优化输出吗?

时间:2018-05-15 21:58:38

标签: requirejs cdn r.js

main.js

requirejs.config({
    css: "https://cdnjs.cloudflare.com/ajax/libs/require-css/0.1.10/css",
    fontawesome: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome"
});
requirejs(["css!fontawesome"]);

app.build.js

({
    name: "main",
    out: "built.js",
    paths: {
        css: "empty:",
        fontawesome: "empty:"
    }
})

r.js -o app.build.js 抛出

Error: TypeError: Cannot read property 'normalize' of undefined
In module tree:
    main

似乎“排除”这样的选项仅适用于模块吗?

0 个答案:

没有答案