How to combine Gulp and Webpack?
-
Good day! I want to combine the work of Gulp and Webpack, but I can not figure out the local server. With npm run build, everything works as it should, but when it comes to starting the server, nothing works, as I understand it, because of the conflict between browser-sync and webpack-dev-server. How to combine their work for easy development? If you need a more detailed code, write, I'll skip it.
In package.json, there are the following scripts:
Package.json "scripts": { "editorconfig": "editorconfig-cli", "eslint": "eslint source/**/*.js", "stylelint": "stylelint \"source/sass/**/*.scss\" --syntax scss", "test": "npm run editorconfig && npm run stylelint && npm run eslint", "build": "gulp build && webpack", "start": "gulp start && webpack-dev-server --open" },
Gulp has the following tasks:
exports.build = parallel(clear, copy, styles, svgSprite, html); exports.start = parallel(this.build, server);
JavaScript Asher Keith, Mar 20, 2019
0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!