How to use gulp webpack-stream to generate a proper named file?

前端 未结 4 1370
刺人心
刺人心 2021-02-19 03:19

Currently we\'re using Webpack for our Module loader, and Gulp for everything else (sass -> css, and the dev/production build process)

4条回答
  •  盖世英雄少女心
    2021-02-19 03:50

    Ah I read on a bit further and figured it out:

    gulp.task('webpack', function() {
        return gulp.src('entry.js')
        .pipe(webpack( require('./webpack.config.js') ))
        .pipe(gulp.dest('app/assets/js'));
    });
    

    ^ here I can just pass in my actual webpack.config and it will use the paths I have already set in there. In my case I just removed app/assets/js since I have that path in now gulp instead.

    Still no earthly idea though, why with the first task I created, it generates random hash filenames?

提交回复
热议问题