Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Version with debug enabled:

     <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
Production version:

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
If you need something more complex, vue-cli has webpack inbuilt:

    vue init webpack my-project
    cd my-project
    npm install
    npm run dev
Or if you need webpack, but not the complexity, swap the word 'webpack' in the above command to 'webpack-simple'.

... Vue has already done the hard work of getting the build apps configured for you.



I don't follow. How to use Vue's single-file component if you only load Vue from a script tag? And can I use Brunch instead of Webpack if I want to use single-file components?


Vue's single file components (SFC) require a build tool such as Webpack or Browserify. See https://vuejs.org/v2/guide/single-file-components.html


> And can I use Brunch instead of Webpack if I want to use single-file components?

Probably, but Vue only officially supports Webpack or Browserify.


Vue also has a graphic interface now, try `vue ui`




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: