
You can do this easily using the following setup: Add the umd (or dist) directory to your. All you need to do is include your UMD build in your npm package (not your repo, that's different).
#Vue js unpkg code#
Rather than building a simple “hello world”, we will incorporate two components and router, and axios to call external services - and get all this working within a single HTML page and a couple of JS files.
#Vue js unpkg full#


Here’s a demo of how a simple Vue setup from CDN can be used for quick demo projects.īut, why use Vue from CDN? There may be a few cases where such an arrangement can help. The Vue build available in this way is also called UMD (Universal Module Definition) build since you can use Vue from anywhere and the project does not need specific setup to build and package your code. Create the Vue template as an object (use Bootstrap for styling) Show access and content links Display Content links only if user has logged in data (and computed, methods etc.) will be objects as well, and used where relevant (almost represents real Vue single file components) The value to check whether user has logged in comes from the root. I had to work on a MVP where there were specific instructions to use Vue directly from a CDN.
