Vue 3 example app without build step
Vue 3 example app without compile and build step when you cannot use node
or npm
to build Vue SPA for whatever reason.
Some restrictions apply:
webpack
to minify bundle and tree shake (higher download size and less performant)babel
to transpile
TypeScript
not supportedSass
not supportedES6 Modules
not supported.vue
files (Single Vue Components)
template
runtime compilation is slower than Single Vue Components
Component-scoped CSS
index.html
then they will be loaded in waterfall (synchronous and time expensive), also easy to forget and hard to scalenpm
build or node
dependencies not available via CDNStart a development server to serve project files to localhost:3000
.
npm run serve
This avoids CORS
errors because index.html
cannot be opened via file://
protocol, http(s)://
is needed.
Development dependency browser-sync
will be installed. This is the only depedency using npm
and it is only for local development, not production.
Install pushqrdx.inline-html
extension for syntax highlighting with render html
and template /*html*/
tags.
Just add src
folder to your production server.
No node
, npm
nor npm run build
required.