在将angular更新到v12和将storybook更新到v6.3.13之后,有请求获取组件模板,但在storybook中没有v5.3。请求以404结尾。
环境:
"@storybook/angular/webpack": "^5"
"@angular/cli": "^12.2.18",
"storybook": "6.3.13",
"typescript": "4.3.5",
"@storybook/angular": "6.3.13",
"@storybook/builder-webpack5": "6.3.13",
"@storybook/manager-webpack5": "6.3.13",
"webpack": "^5.88.2"
.storybook/main.js
module.exports = {
staticDirs: ['../dist/ui-kit', '../src/assets'],
stories: ['../src/**/*.stories.ts'],
framework: {name: '@storybook/angular'},
core: {
builder: 'webpack5',
},
};
angular.json build config
"ui-kit": {
"root": "projects/ui-kit",
"sourceRoot": "projects/ui-kit/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/evo-ui-kit/tsconfig.lib.json",
"project": "projects/evo-ui-kit/ng-package.json"
}
}
}
}
1条答案
按热度按时间rsaldnfx1#
最后通过在angle.json中添加项目配置解决了这个问题: