@storybook/angular 9.0.6 → 9.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,12 @@ async function webpackFinal(baseConfig, options) {
25
25
  builderContext,
26
26
  });
27
27
  webpackConfig.plugins = webpackConfig.plugins ?? [];
28
+ // Change the generated css filename to include the contenthash for cache busting
29
+ const miniCssPlugin = webpackConfig?.plugins?.find((plugin) => plugin?.constructor?.name === 'MiniCssExtractPlugin');
30
+ if (miniCssPlugin && 'options' in miniCssPlugin) {
31
+ miniCssPlugin.options.filename = '[name].[contenthash].css';
32
+ miniCssPlugin.options.chunkFilename = '[name].iframe.[contenthash].css';
33
+ }
28
34
  webpackConfig.plugins.push(new builder_webpack5_1.WebpackDefinePlugin({
29
35
  STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
30
36
  experimentalZoneless: builderOptions.experimentalZoneless,
@@ -22,6 +22,12 @@ export async function webpackFinal(baseConfig, options) {
22
22
  builderContext,
23
23
  });
24
24
  webpackConfig.plugins = webpackConfig.plugins ?? [];
25
+ // Change the generated css filename to include the contenthash for cache busting
26
+ const miniCssPlugin = webpackConfig?.plugins?.find((plugin) => plugin?.constructor?.name === 'MiniCssExtractPlugin');
27
+ if (miniCssPlugin && 'options' in miniCssPlugin) {
28
+ miniCssPlugin.options.filename = '[name].[contenthash].css';
29
+ miniCssPlugin.options.chunkFilename = '[name].iframe.[contenthash].css';
30
+ }
25
31
  webpackConfig.plugins.push(new WebpackDefinePlugin({
26
32
  STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
27
33
  experimentalZoneless: builderOptions.experimentalZoneless,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "9.0.6",
3
+ "version": "9.0.9",
4
4
  "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -52,8 +52,8 @@
52
52
  "prep": "rimraf dist && jiti ../../../scripts/prepare/tsc.ts"
53
53
  },
54
54
  "dependencies": {
55
- "@storybook/builder-webpack5": "9.0.6",
56
- "@storybook/core-webpack": "9.0.6",
55
+ "@storybook/builder-webpack5": "9.0.9",
56
+ "@storybook/core-webpack": "9.0.9",
57
57
  "@storybook/global": "^5.0.0",
58
58
  "@types/webpack-env": "^1.18.0",
59
59
  "fd-package-json": "^1.2.0",
@@ -96,7 +96,7 @@
96
96
  "@angular/platform-browser": ">=18.0.0 < 21.0.0",
97
97
  "@angular/platform-browser-dynamic": ">=18.0.0 < 21.0.0",
98
98
  "rxjs": "^6.5.3 || ^7.4.0",
99
- "storybook": "^9.0.6",
99
+ "storybook": "^9.0.9",
100
100
  "typescript": "^4.9.0 || ^5.0.0",
101
101
  "zone.js": ">=0.14.0"
102
102
  },