Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active March 19, 2019 10:11
Show Gist options
  • Save vanaf1979/49a927d96621f60cb57af842b16840e3 to your computer and use it in GitHub Desktop.
Save vanaf1979/49a927d96621f60cb57af842b16840e3 to your computer and use it in GitHub Desktop.
Gist for my "WordPress: Laravel Mix, Sass and ES6 Modules in theme development" tutorial at Medium http://bit.ly/wplaravelmixtut
<?php
function mix_tutorial_enqueue_scripts() {
$theme = wp_get_theme();
wp_enqueue_script( $theme->get('TextDomain') . '-manifest' , get_template_directory_uri() . '/public/js/manifest.js' , array() , $theme->get('Version') , true );
wp_enqueue_script( $theme->get('TextDomain') . '-vendor' , get_template_directory_uri() . '/public/js/vendor.js' , array() , $theme->get('Version') , true );
wp_enqueue_script( $theme->get('TextDomain') . '-app' , get_template_directory_uri() . '/public/js/app.js' , array() , $theme->get('Version') , true );
}
add_action( 'wp_enqueue_scripts', 'mix_tutorial_enqueue_scripts' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment