Ken Kinder
Ken Kinder

Reputation: 13140

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

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!

Upvotes: 5

Views: 3553

Answers (1)

Matthias Weiß
Matthias Weiß

Reputation: 508

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.

Upvotes: 4

Related Questions