Answer the question
In order to leave comments, you need to log in
How to combine Gulp and Webpack?
Good afternoon! I want to combine the work of Gulp and Webpack, but I can't deal with the local server. With npm run build everything works as it should, but when it comes to starting the server, nothing works, I understand that because of the conflict between browser-sync and webpack-dev-server. How to combine their work for convenient development? If you need more detailed code, write, I'll throw it off.
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"
},
exports.build = parallel(clear, copy, styles, svgSprite, html);
exports.start = parallel(this.build, server);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question