DocsPage customization error in Angular
See original GitHub issueI’m trying to reproduce the DocsPage customization you guys pulled off in the config.js
below, but for Angular:
https://github.com/storybookjs/storybook/pull/7680/files#diff-e1df968bb7311b09ca002ef2869df4ee
…but I’m getting:
ERROR in ./.storybook/preview.js 111:11
Module parse failed: Unexpected token (111:11)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| docs: function docs(_ref) {
| var context = _ref.context;
> return <DocsPage context={context} subtitleSlot={function (_ref2) {
| var selectedKind = _ref2.selectedKind;
| return "Subtitle: ".concat(selectedKind);
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/angular/config.js ./.storybook/preview.js ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true ./src/globalStyles.scss main[4]
A straight up docs: DocsPage
works fine, but when I try to override it like shown in your code, it explodes. Is this possible with Angular?
At the end of the day, I’m just looking to include custom story-level markdown in the description or subtitle slots. So a tip on another approach would unblock me, but it would be nice to be able to granularly customize like that PR example aimed for.
System: OS: macOS Mojave 10.14.3 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Binaries: Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node npm: 6.2.0 - ~/.nvm/versions/node/v10.9.0/bin/npm Browsers: Chrome: 79.0.3945.117 Firefox: 70.0.1 Safari: 12.0.3 npmPackages: @storybook/addon-backgrounds: ^5.3.2 => 5.3.2 @storybook/addon-docs: ^5.3.2 => 5.3.2 @storybook/addon-knobs: ^5.3.2 => 5.3.2 @storybook/addon-storysource: ^5.3.2 => 5.3.2 @storybook/addons: ^5.3.2 => 5.3.2 @storybook/angular: ^5.3.2 => 5.3.2 @storybook/source-loader: ^5.3.2 => 5.3.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (8 by maintainers)
Top GitHub Comments
Was this ever fixed? Still getting this in 6.4
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!