• I am working in a plugin and tried enqueue vue.min.js there in the admin panel, but getting no effect. Meaning, my code is not running properly. i have enqueued the file properly for sure like this in a class
    function __construct() {
    add_action( ‘admin_enqueue_scripts’, array( $this, ‘admin_scripts_styles’ ) );
    $this->includes();
    }

    function admin_scripts_styles() {
    global $pagenow;
    if ( $pagenow == ‘post.php’ && get_post_type() == ‘std_todo’ ) {
    wp_enqueue_style( ‘std-bs’, plugins_url( ‘css/bootstrap.min.css’, __FILE__ ) );
    wp_enqueue_script( ‘std-vue-js’, plugins_url( ‘js/vue.min.js’ , __FILE__ ), array( ‘jquery’ ), false );
    }
    }

    i checked the path in the source code also and this is correct
    http://localhost/wp_4.3.1/wp-content/plugins/smart-todo/js/vue.min.js?ver=4.3.1

    but the fact is noting is rendered as expected. What is solution ? I mean even a single code is rendering like plain text like this,
    “{{ task.body }}”
    how to do that ? Anyone having the same problem as mine ?

  • The topic ‘Enqueuing vue.min.js does not have any effect !’ is closed to new replies.