DEV Community

Discussion on: Take Your WordPress Site Further With Vue.js

Collapse
 
s1awek profile image
Slawek

Unfortunately, your solution doesn't work for me, because npm run build produces files with random names, so that also won't work:

    wp_enqueue_style( 'vue_wp_styles', plugin_dir_url( __FILE__ ) . 'dist/css/app.css' );
    wp_register_script( 'vue_wp_compiled', plugin_dir_url( __FILE__ ) . 'dist/js/app.js', true );
    wp_register_script( 'vue_wp_dependencies', plugin_dir_url( __FILE__ ) . 'dist/js/chunk-vendors.js', true );
Enter fullscreen mode Exit fullscreen mode

For example there is no app.css file only app.dsf665lkfg.css

Collapse
 
stephenwhitmore profile image
Stephen Whitmore

Thanks for pointing this out. I originally wrote this article a year and a half ago so it's possible that may not have been the case at the time. Or it was an oversight. Either way I've updated the article with a more accurate example and a note about the changing file names below it.