我尝试在 Salesforce 沙盒中部署 Angular 12 应用程序,但出现了一些错误。
我使用 gulp-jsforce-deploy lib 进行 Salesforce 部署。
错误:
[11:23:01]
[11:23:01] Failures:
[11:23:01] - Error on pkg/staticresources/***.resource : content expected in separate file, not meta file for deploy
包结构如下
pkg/staticresources/***.resource 文件基于以下脚本创建,这是一个 gulp 任务。
function zipResources(gulp, buildConf) {
const resources = `${buildConf.salesforce.target}/.staticresources/*`;
const resourcesArchive = `${buildConf.salesforce.packageName}.resource`;
const staticResourcesTarget = `${buildConf.salesforce.target}/pkg/staticresources/`;
return gulp.src(resources)
.pipe(zip(resourcesArchive))
.pipe(gulp.dest(staticResourcesTarget));
}