uni-events-helper-wx
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
404 B

3 years ago
  1. const TransformPages = require('uni-read-pages')
  2. const {
  3. webpack
  4. } = new TransformPages()
  5. module.exports = {
  6. configureWebpack: {
  7. plugins: [
  8. new webpack.DefinePlugin({
  9. ROUTES: webpack.DefinePlugin.runtimeValue(() => {
  10. const tfPages = new TransformPages({
  11. includes: ['path', 'name', 'aliasPath', 'meta']
  12. });
  13. return JSON.stringify(tfPages.routes)
  14. }, true)
  15. })
  16. ]
  17. }
  18. }