Created
July 16, 2018 07:44
-
-
Save AllenFang/93a538ccf2605dda0a140089450e26a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gulpWebpack from 'webpack-stream'; | |
import config from './config/webpack.prod.config'; | |
function webpack() { | |
return gulp.src(Object.values(config.entry)) | |
.pipe(gulpWebpack({ config }, null, (err, stats) => { | |
stats.compilation.chunks.forEach(({ files: assets, name }) => { | |
// name is chunk name | |
// assets is chunk file name | |
// persist them here! | |
}); | |
})) | |
.pipe(gulp.dest(config.output.path)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment