DEV Community

Van Balken
Van Balken

Posted on

Trying Vue without NPM

You can start hacking away with Vue (and Axios) without NPM. One simple html-file is all you need. In this post I will show you how with an example based on the official Vue.js guides.

I wanted to create a simple frontend to show some data from a REST API. I wanted to use a modern framework but I didn't wanted to bother with Node and NPM. Luckily with Vue.js thats really easy to do!

Vue.js can be easily included using a script-tag and the same goes for Axios.

Below you find a working example of the official Vue.js Using Axios to Consume APIs example in copy-paste-able html:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Hello Vue</title>
    <!-- development version, includes helpful console warnings -->
    <script src=""></script>
    <script src=""></script>
<div id="app">
    <h1>Bitcoin Price Index</h1>
    <div v-for="currency in info" class="currency">
        {{ currency.description }}:
        <span v-html="currency.symbol"></span>{{ currency.rate_float | currencydecimal }}
    new Vue({
        el: '#app',
        data: {
            info: null
        mounted () {
                .then(response => =;
Enter fullscreen mode Exit fullscreen mode

The same is also possible with (but not limited to):

Top comments (0)