Vuejs work on old browsers if using vue via cdn? - vue.js

i wonder that Vue.js will work on old browsers if i import vue to my html via cdn?
like:
<script src="https://cdn.jsdelivr.net/npm/vue"></script>

doubtful. If the website is not working when you building it with Webpack or load the vue code from your own server, then loading from a CDN will now not make any difference. It is the exact same code.
your best bet is to use Webpack, and polyfill the code to work with older browsers.

I suggest you this reading for all your questions.
https://cli.vuejs.org/guide/browser-compatibility.html#browserslist

Related

Autocomplete in vscode while using vue cdn

I'm building a project where some parts of the webpage are Vue components. And offcourse I'm using Vscode to develop it. Since this is not a complete Vue app I'm not able to use extensions like vetur to autocomplete. I was wondering if there was a way to tell Vscode that <script> includes "Vue" code or is there an extension to do so?
I don't think there is.
Just try working with it that way.
Or better still, work with the .vue files in a separate folder and move them to your current working directory when you're done.
Not efficient, but it's the best solution I can think of.

Using snowpack with the vue template but chrome dev-tools don't work with it

Using snowpack with the Vue template. Just set it up. But chrome dev-tools says it doesn't recognize it as
vue.
I have deployed a basic Vue template app with vue-cli and this one get recognized as Vue. So the use Vue for local files is working correctly.
Not sure what it needs more or if it's something specific with snowpack
Using vue 3 and chrome dev-tools probably doesn't support it yet.

How to pre-render initial page in VueJS using Webpack?

Is it possible to pre-render initial page of a VueJS app in Webpack as its done in preact-cli?
https://github.com/developit/preact-cli
Possible option that I can think of is Vue SSR, but is there a plugin available which does this? I couldn't find any which works.
Nuxtjs supports static pre-rendering.

What is the difference between importing Vue.js library and installing it via Vue-CLI?

Could you please explain what is the main difference between different Vue installation methods for building a one-page website (page routing) with Vue and an Electron app using Vue:
importing Vue.js library via <script>
installing it via Vue-CLI
This installation guide doesn't really help understand the difference.
Is my site / app going to work slower if I just import Vue via <script>?
The <script> include is for including the Vue library in your webpage just like you would any other JavaScript library. Vue will be available on the window object for you to access globally. All external JavaScript must be included like this one way or another, even if you use vue-cli.
vue-cli is just a tool which generates Vue projects from templates. The setup really depends on the template that you use; I imagine most people would probably use the webpack template for medium to large sized Vue projects. This will initialize a node project directory containing all files necessary to develop, debug, test and build a Vue project. Webpack takes care of bundling all modules into a single JavaScript bundle which is included into the webpage via <script>. You can also benefit from vue-loader which allows you to write Vue components in *.vue files.
Is my site / app going to work slower if I just import Vue via <script>?
I mean, not really, no (your development speed might be hindered though since you won't benefit from all the bells and whistles that vue-cli sets you up with). Your question applies more to the development approach that you will follow for developing a Vue web application.

Include VueJS Plugin without Javascript Package Manager

How can I use VueJS plugins if I don't use any Javascript Package Managers (NodeJS, NPM)?
I'm building an app made from a Bootstrap template and Server Side framework in Coldfusion (CFWheels).
I wanted to use some of VueJS's functionality such as two-way data-binding, easier integration of animation using animate.css, etc. I included it via
<script src="https://unpkg.com/vue"></script>
However, I can't use NPM as the app will be continually be improved and maintained in production.
I wanted to use some VueJS plugin such as VueJS typeahead.
When I include the script, and try the documentation, there are errors in the Javascript like being unable to import, export module, require. I think these are modern Javascript coding style that are not recognized in my setup because I didn't use the NPM and require those polyfills.
Is there a way that I can make those VueJS plugins work? Or if I can just include the polyfills needed and proceed with the plugin documentations so the browser will understand those new JS terms without using NPM or other Javascript Package Manager.