summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-05-02 01:02:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commitde444288bf67321d7306a317bff821959c81e766 (patch)
tree25b78256975222b00a39140ad56833d3c2eccc76 /application/views
parent46f0516a885ff28d63699c892eecd7a34b6a9ac3 (diff)
Add support for minified main.js
Diffstat (limited to 'application/views')
-rw-r--r--application/views/header.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/application/views/header.php b/application/views/header.php
index 89a3c8617..f80ffed05 100644
--- a/application/views/header.php
+++ b/application/views/header.php
@@ -26,13 +26,19 @@ if (is_cli_client() && !isset($force_full_html)) {
echo '<link href="'.link_with_mtime("/data/local/favicon.png").'" rel="shortcut icon">';
}
?>
+ <script src="<?php echo link_with_mtime("/data/js/vendor/require.js"); ?>"></script>
<script type="text/javascript">
/* <![CDATA[ */
- var require = { baseUrl: '/data/js' };
window.appConfig = {};
+ require.config({
+ baseUrl: '/data/js',
+ paths: {
+ 'main': ['<?php echo main_min_js_name(); ?>', 'main']
+ }
+ });
+ require(['main']);
/* ]]> */
</script>
- <script data-main="main" src="/data/js/vendor/require.js"></script>
</head>
<body>