Created
July 28, 2016 02:09
-
-
Save raphaelkross/7bdea758800862cfdde7fd5c5e8b92b3 to your computer and use it in GitHub Desktop.
Enqueue our dynamic webpack code
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
if(false == IVAN_OFFSET_DEBUG) { | |
// Register main theme styles and enqueue it. | |
// Hint: you can unregister it and replace by your own compiled version in a child theme. | |
wp_enqueue_style( 'ivan-theme-styles', get_template_directory_uri() . '/css/theme-styles'.$prefix.'.css', array(), '1' ); | |
} else { | |
wp_enqueue_script( 'webpack-dev-server', 'http://localhost:3002/webpack-dev-server.js', array(), null, false ); | |
wp_enqueue_script( 'webpack-bundle', 'http://localhost:3002/hmr/bundle.js', array(), null, false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment