vue.config.js 516 B

1234567891011121314151617181920
  1. const TransformPages = require('./js_sdk/uni-read-pages')
  2. const {webpack} = new TransformPages()
  3. module.exports = {
  4. devServer:{
  5. proxy: 'http://localhost:8080',
  6. public: '192.168.2.60:8080' // 本地ip
  7. },
  8. configureWebpack: {
  9. plugins: [
  10. new webpack.DefinePlugin({
  11. ROUTES: webpack.DefinePlugin.runtimeValue(() => {
  12. const tfPages = new TransformPages({
  13. includes: ['path', 'name', 'aliasPath','animation', 'meta']
  14. });
  15. return JSON.stringify(tfPages.routes)
  16. }, true )
  17. })
  18. ]
  19. }
  20. }