Minify react & react-dom in production

This commit is contained in:
Andrew Sliwinski 2015-10-25 18:58:17 -04:00
parent 73b3a91a05
commit de5e479b52
2 changed files with 6 additions and 5 deletions

View file

@ -13,5 +13,8 @@ module.exports = {
og_image_height: 860,
// Analytics & Monitoring
ga_tracker: process.env.GA_TRACKER || ''
ga_tracker: process.env.GA_TRACKER || '',
// Use minified JS libraries
min: (process.env.NODE_ENV === 'production') ? '.min' : ''
};

View file

@ -41,8 +41,8 @@
<div id="footer"></div>
<!-- Scripts -->
<script src="/js/lib/react.js"></script>
<script src="/js/lib/react-dom.js"></script>
<script src="/js/lib/react{{min}}.js"></script>
<script src="/js/lib/react-dom{{min}}.js"></script>
<script src="/js/main.bundle.js"></script>
<script src="/js/{{view}}.bundle.js"></script>
@ -59,7 +59,5 @@
});
ga('send', 'pageview');
</script>
<!-- @todo New Relic -->
</body>
</html>