5

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!

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

These days Laravel Mix is probably the way to go (github.com/JeffreyWay/laravel-mix)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.