Closed xmsz closed 3 years ago
安装 Iceworks 插件后 https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks,可以在 Iceworks 的新建工程中,找到 Midway 模板
安装 Iceworks 插件后 https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks,可以在 Iceworks 的新建工程中,找到 Midway 模板
看到了 藏得有点小深 希望在文档里有介绍一下
使用@midwayjs/hooks
"dependencies": {
"@midwayjs/faas": "^2.5.5",
"@midwayjs/faas-middleware-static-file": "^1.0.0",
"@midwayjs/hooks": "^1.0.1",
"rax": "^1.1.0",
"rax-document": "^0.1.0",
"rax-image": "^2.0.0",
"rax-link": "^1.0.1",
"rax-text": "^2.0.0",
"rax-view": "^2.0.0",
"universal-request": "^2.2.0"
},
"devDependencies": {
"@iceworks/spec": "^1.0.0",
"@midwayjs/faas-cli": "^1.2.32",
"@midwayjs/faas-cli-plugin-midway-hooks": "^1.0.1",
"@types/rax": "^1.0.0",
"build-plugin-midway-faas": "^1.0.0",
"eslint": "^6.8.0",
"prettier": "^2.1.2",
"rax-app": "^3.0.0",
"stylelint": "^13.7.2",
"typescript": "^3.9.7"
},
其他设置根据https://github.com/midwayjs/midway-serverless-examples设置即可
注意的是typescript暂时不能高于3.9.7否则运行不了
因为serverless框架用的是Midway,所以需要有将Rax整合到Midway的示例。或者Rax直接支持兼容Midway。目前文档只有阿里云云函数