seajs的使用实例:
以下为在sea.js里配置信息
var staticPath = "/assets/dist";
seajs.config({
paths: {page: staticPath + "/pages"},
alias: {jquery: staticPath + "/lib/jquery/1.11.1/jquery.min"},
map: [[/^(.*\.(?:css|js))(.*)$/i, "$1?201511171355"]],
preload: ["jquery"]
});
以下为在网页中配置的信息
<script>seajs.use(“page/mobile/footer”)</script>
实际地址是:/assets/dist/pages/mobile/footer.js
达维营-前端网