Answer the question
In order to leave comments, you need to log in
How to compile project gulp + vue files into one js and css?
Hello. recently started to deal with building a project written in vuejs. For simple things, I used gulp, so I started with it.
In Gulp, I created a task that collects js and scss into one file. there are no problems here. But what about when vuejs comes along? I have so far managed to assemble vue components into 1 js and 1 css file.
I would like to know if it is possible to combine all this? here is an example gulpfile.js .
The first thing that came to mind was that you need to run everything in turn, i.e. first I will build a vuejs application, and then I will collect the results in general tasks with styles and JS scripts.
but
gulp.task('build', ['clean', 'vue', 'styles', 'scripts', 'fonts']);
Answer the question
In order to leave comments, you need to log in
для строго очередного запуска попробуйте gulp-sequence
var gulpSequence = require('gulp-sequence');
var defaultTask = function (cb) {
gulpSequence(['task1', 'task2'], ['task3', 'task4'], 'watch', cb);
};
You would better bring all the real code that does not work, you can only guess from these pieces, like on coffee grounds. And it turns out to be more than strange, to talk about an error when working with an array and not to declare an array. Especially since you yourself write that the error is there. Select such a minimal piece of code, the operation of which leads to an error, but which you can copy for yourself, compile, run and look at the errors. And maybe without it everything will be clear.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question