4 ms·
You can use Vue.js 2 without build system by just loading into the browser.
by brainzap 6y ago
You can use Vue.js 2 without build system by just loading into the browser.
- nicbou 6y agoCan confirm. I built 2 VueJS apps that are 100% static, and it was not a problem at all.
- iFreilicht 6y agoA 100% static site doesn’t run any JS, right? What did you need Vue for, then?
- zimmund 6y agoA static site may use JS, but doesn't require server-side logic (PHP, databases, or any other type of dynamic content). In this case OP implies that it doesn't even require a build (because you may create a static site through a build process -like Jekyll does, for example-).
- nicbou 6y agoStatic from the server perspective. It only serves files in a directory without any parsing or processing.
- shrew 6y agoYou can still do this with Vue 3! The CodePen embeds they use in their "Getting Started" docs are all still just loading in an external library and making use of it with vanilla JS. https://codepen.io/team/Vue/pen/KKpRVvJ https://codepen.io/team/Vue/pen/KKpRVvJ
- franga2000 6y agoSure you can, but then the moment you want to use an external library with it, it's basically a coin flip whether they ship it in the correct format for that. If they don't, you have to import it - but you can only import from modules. So you modify your page to load your code as a module instead, but now you can't access the global state. So you refractor everything and realize, that your page takes a minute to load because each of those modules contains like a 100 dependencies and half of them overlap. TL;DR: it's there, but it's really only usable in like 5% of scenarios
- deleted 6y ago[deleted]