Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to build vue.js components without using the npm server?

Tags:

Put simply, I want to use vue.js's single file components inside of another project with its own web server and backend code. I want to "compile" my .vue files the way I would compile CoffeeScript files, or LESS files.

For example, suppose I have a Flask/Python project (which I do), in which I have my own web server that serves static files. I may layout my project like this:

static/src/frontend.vue -> static/build/frontend.css, static/build/frontend.js

I see that Vue's documentation has examples for running a node.js web server to generate built files live. What I don't see, however, is a way to simply compile the .vue files into another directory and exit. Is this possible with npm/webpack/node.js/vue.js?

Thank!

like image 938
Ken Kinder Avatar asked Jan 02 '17 17:01

Ken Kinder


1 Answers

You could use any of the vuejs-templates for vue-cli and simply run `npm run build``

Another alternative is Jeffrey Way's vueify for laravel-elixir which depends on gulp.

like image 195
Matthias Weiß Avatar answered Sep 22 '22 11:09

Matthias Weiß