src/entry.js
function wxappEntry() {

  const regex = /src\/pages\/([^\/]+)\/[^\.]+.js/;
  
  return {
    entry: () => {

      let pages = {}
      let core = []

      glob.sync(`./src/pages/**/*.js`).forEach(x => {
        const name = x.match(regex)[1]
        const key = `pages/${name}/${name}`
        pages[key] = x
      })

      return Object.assign({}, pages, {
        app: [
          //'webpack-dev-server/client',
          //'webpack/hot/only-dev-server',
          './src/app.js'
        ]
      })
    }
  }
}
function wxappEntry() {

  const regex = /src\/pages\/([^\/]+)\/[^\.]+.js/;
  
  return {
    entry: () => {

      let pages = {}
      let core = []

      glob.sync(`./src/pages/**/*.js`).forEach(x => {
        const name = x.match(regex)[1]
        const key = `pages/${name}/${name}`
        pages[key] = x
      })

      return Object.assign({}, pages, {
        app: [
          //'webpack-dev-server/client',
          //'webpack/hot/only-dev-server',
          './src/app.js'
        ]
      })
    }
  }
}
function wxappEntry ( ) { const regex = / src\/pages\/([^\/]+)\/[^\.]+.js / ; return { entry : ( ) => { let pages = { } let core = [ ] glob . sync ( ` ` ) . forEach ( x => { const name = x . match ( regex ) [ 1 ] const key = ` ${ name } ${ name } ` pages [ key ] = x } ) return Object . assign ( { } , pages , { app : [ //'webpack-dev-server/client', //'webpack/hot/only-dev-server', './src/app.js' ] } ) } } }
WeChat app looks like multi entries app.

@see https://github.com/rabbitlive/rabbitinit/tree/master/wxapp
WeChat app looks like multi entries app .