DEV Community 👩‍💻👨‍💻

Cover image for How to use npm package without build tool?

Posted on

How to use npm package without build tool?

How to?

  • Search for npm package
  • Import script using skypack url in your html page
    <script type="module">
        import { nanoid } from '';
        console.log('Random ID', nanoid());
Enter fullscreen mode Exit fullscreen mode
  • Refer to index.html for sample page using nanoid.

Outuput (using sample index.html)

Page hosted on

Top comments (0)

Classic DEV Post from 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!