小编R. *_*ter的帖子

Angular 9 和 Storybook:添加 @angular/localize/init polyfill

更新到 angular 9 时,我收到以下 Storybook 错误。

来自故事书的错误信息

错误说我需要为国际化添加一个 polyfill,但我不知道如何做。

我需要配置 webpack 并在那里添加 polyfill,但我无法让它工作。

有谁知道如何解决这一问题?

干杯

编辑:为了澄清我确实ng add @angular/localize在 angular 项目中运行了。

尽管如此,Storybook 并没有接受它。

这是我的 polyfills.ts 文件。

/***************************************************************************************************
 * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
 */
import '@angular/localize/init';
/**
 * This file includes polyfills needed by Angular and is loaded before the app.
 * You can add your own extra polyfills to this file.
 *
 * This file is divided into …
Run Code Online (Sandbox Code Playgroud)

angular storybook angular9

5
推荐指数
1
解决办法
3026
查看次数

标签 统计

angular ×1

angular9 ×1

storybook ×1