Skip to content

[Question] 0.1.x版本怎么设置proxy #129

Open
@jqhr

Description

@jqhr

我在开发低代码引擎的设置器,官方的脚手架工具是这个,它用的就是@alib/build-scripts的版本是0.1.32。
目前我找不到build-scripts的文档,build.json如下
image
执行build-scripts start会报错:
image
现在开发要调用接口,怎么办

Activity

testudy

testudy commented on Aug 9, 2023

@testudy

build.lowcode.js配置devServer中的proxy,关键代码如下:

module.exports = {      
  devServer: {    
    proxy: {    
        '/api/': {    
          target: 'https://xxx.xxxxxx.com/',    
          changeOrigin: true    
        }    
      }    
  },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [Question] 0.1.x版本怎么设置proxy · Issue #129 · ice-lab/build-scripts