0
Main.js錯誤時設置require.js配置
require.config({
paths: {
ractive: "../lib/ractive",
rv: "../loaders/rv",
waitSeconds: 200
},
name: "main",
out: "../dist/js/main.js",
stubModules: ["rv"]});
Feed.js
require(["../lib/ractive", "../loaders/rv!../templates/Feed/Main"],
function (ractive, feedTemplate) {
console.log(ractive);
console.log(feedTemplate);
"use strict";
的Index.html
<script src="js/require.js" data-main="js/modules/Main" ></script>
<script src="js/modules/Feed.js"></script>
Ractive加載罰款,但RV不裝載好。
rv的錯誤消息。 Load timeout for modules: ../loaders/rv!../templates/Feed/Main_unnormalized2,ractive
有什麼我忘記了嗎?