vue.config.js 641 B

123456789101112131415161718192021222324252627282930313233
  1. const TransformPages = require('uni-read-pages')
  2. transpileDependencies: ['z-paging']
  3. const {
  4. webpack
  5. } = new TransformPages()
  6. module.exports = {
  7. devServer: {
  8. host: 'localhost',
  9. port: '8081',
  10. https: true,
  11. proxy: {
  12. '^/api.': {
  13. target: 'http://nywhcm.com/addons/wike_aging/public/index.php',
  14. changeOrigin: true
  15. },
  16. },
  17. },
  18. configureWebpack: {
  19. plugins: [
  20. new webpack.DefinePlugin({
  21. ROUTES: webpack.DefinePlugin.runtimeValue(() => {
  22. const tfPages = new TransformPages({
  23. includes: ['path', 'name', 'aliasPath', 'meta']
  24. });
  25. return JSON.stringify(tfPages.routes)
  26. }, true)
  27. })
  28. ],
  29. }
  30. }