Last active
May 16, 2016 15:14
-
-
Save mbopp/dbb28e28f108c898846e43fd718a5159 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
$react_env = variable_get('react_environment', 'dist'); | |
if ($react_env == 'dev') { | |
drupal_add_js('http://localhost:3000/webpack-dev-server.js', array('scope' => 'footer')); | |
drupal_add_js('http://localhost:3000/bundle.js', array('scope' => 'footer')); | |
} else { | |
drupal_add_js(drupal_get_path('module', 'react_app').'/js/dist/bundle.js', array('scope' => 'footer')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment