更新到 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)