Gulp task routing problem?

  node.js, question

clipboard.png

Code in webpack.config.js:

clipboard.png

Each directory under the page directory is JS-related code of one page, SRC is the code before packaging, and I want to use gulp-webpack packaging code to generate it under dist directory in the directory of the corresponding page.
The function to be realized is to execute gulp webpack, traverse src packages in all first-level directories under page, and js produces dist to store the packaged code under the current page.
At present, my route is fixed.

So, what is your question? Although your thinking is not very handsome (I don’t even know why you don’t use it directly herewebpackInstead, use a packaged versiongulp-webpack)。 But the idea is really feasible, do try