Mini Program developer uses webpack to package pug,stylus files

I want to use pug,stylus to develop Mini Program, and finally use webpack to package to generate a dist directory

such as
page/index

      index.pug
      index.styl
      index.json
      index.js

generate
dist/page/index

     index.wxml
     index.wss
     index.json
     index.js
 

encountered a problem:
1. Unlike the web, entry file app.js, Mini Program cannot find a connection to the webpack of other files

2. Consider copying files directly, and then copy them when you encounter the loader conversion of pug,styl files. If you don"t know how to do this, please give me some advice

.

3. The company architecture does not allow the use of third-party frameworks such as wepy,mpvue, etc., and packaging can only be done with webpack, not gulp

.

Front-end rookies, and ask the great gods for advice.

Menu