ice-lab / build-scripts

:octopus: 基于 Webpack 的插件化工程构建工具,支持快速建设一套开箱即用的工程方案。
MIT License
393 stars 73 forks source link

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

Open jqhr opened 1 year ago

jqhr commented 1 year ago

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

testudy commented 1 year ago

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

module.exports = {      
  devServer: {    
    proxy: {    
        '/api/': {    
          target: 'https://xxx.xxxxxx.com/',    
          changeOrigin: true    
        }    
      }    
  },
};