vuejs / vueify

Browserify transform for single-file Vue components
MIT License
1.17k stars 153 forks source link

Random order in CSS-bundle #195

Open dom1n1k opened 7 years ago

dom1n1k commented 7 years ago

I use vueify in Gulp-task. And I prefer extracting all CSS into single bundle. Like that:

gulp.task('dev:vue', () => {
    return browserify({ entries: './main.js'})
        .transform(babelify, { presets: ['es2015'] })
        .transform(vueify)
        .plugin('vueify/plugins/extract-css', {
            out: './dist/bundle.css',
        })
        .bundle()
            .pipe(source('bundle.js'))
            .pipe(gulp.dest('./dist'));
});

It works. But...

I noticed - styles of components can follow in the bundle in random order! And the order varies from case to case. I think it's potentially dangerous, can make bugs. Order of styles should be equal to order of components.

Sorry for my bad english.