GithubHelp home page GithubHelp logo

carleslc / vue-no-build Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 4 KB

Vue 3 example app without build step

JavaScript 41.53% CSS 10.19% HTML 48.28%
vue no-npm cdn vue-3 no-build-required composition-api

vue-no-build's Introduction

vue-no-build

Vue 3 example app without compile and build step when you cannot use node or npm to build Vue SPA for whatever reason.

Vue is installed via CDN

Some restrictions apply:

  • Cannot use webpack to minify bundle and tree shake (higher download size and less performant)
  • Cannot use babel to transpile
  • Cannot use .vue files (Single Vue Components)
  • If component modules are not preloaded in index.html then they will be loaded in waterfall (synchronous and time expensive), also easy to forget and hard to scale
  • Other functionality that requires a npm build or node dependencies not available via CDN

Develop

Start 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.

.vscode

Install pushqrdx.inline-html extension for syntax highlighting with render html and template /*html*/ tags.

Production

Just add src folder to your production server.

No node, npm nor npm run build required.

Special thanks

vue-no-build's People

Contributors

carleslc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

prnthh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.