Last active
December 31, 2015 03:09
-
-
Save mateuszwrobel/7926050 to your computer and use it in GitHub Desktop.
Structure for r.js optimization to one file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('app', [...], | |
function([...]) { | |
[...] | |
} | |
); | |
require(['app'], function(){}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
baseUrl: "./apps", | |
mainConfigFile: './TestMain.js', | |
name: 'app', | |
out: "./main-built.js" | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var require = { | |
baseUrl: "/apps", | |
paths: { | |
[...] | |
} | |
}; | |
</script> | |
<script data-main="../main-built" src="assets/js/require/2_1_1/require.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requirejs.config({ | |
baseUrl: "/apps", | |
paths: { | |
[...] | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment