requirejs

build.js

1
2
3
4
5
6
7
8
9
({
baseUrl: ".",
paths: {
jquery: "1",
jhary: "2"
},
include: ['1','2'],
out: "main-built.js"
})
1
r.js -o build.js optimize=none

main-built.js

1
2
3
4
5
6
7
8
define('1',[], function() {
return 1;
})
;
define('2',[], function() {
return 2;
})
;
Share