question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular feature branch: Storybook Deployer fails

See original GitHub issue

I’ve been playing around with the Angular support branch contributed here.

After building this in a fork and consuming it in a sample Angular CLI app, it looks the Storybook Deployer/ compiled static assets break when deploying to gh-pages.

Test repo: https://github.com/priley86/storybook-ng-wc-demo

Error thrown here upon compilation w/ Storybook deployer inside Webpack module/static output: https://github.com/priley86/storybook-ng-wc-demo/blob/master/storybook-static/static/preview.30bc209875689e205495.bundle.js#L28972

throw new Error("Module parse failed: /Users/priley/GitHub/storybook-ng-wc-demo/node_modules/@storybook/angular/dist/client/preview/angular/index.ts Unexpected character '@' (24:2)\nYou may need an appropriate loader to handle this file type.\n| \n| const getAnnotatedComponent = (meta, component) => {\n|   @Component(meta)\n|   class NewComponent extends component {}\n| ");

Deployed ng storybook w/ error: https://rawgit.com/priley86/storybook-ng-wc-demo/view-storybook/index.html

Appears the Angular preview source here is getting referenced in the static build incorrectly (should be only be used in local/node js runs I’m guessing).

Great job with this and look forward to having this formally released w/ the Storybook family. I’ll be doing some research w/ Web Components/Skate.js alongside Angular & React implementations inside Storybook, and hopefully I’ll be able to share some of this after!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
ndelangencommented, Nov 6, 2017

Hey @priley86 Can you tell us if things have changed now that the angular work has been merged into the release/3.3 branch?

You can expect an official alpha release real soon! /cc @shilman

1reaction
priley86commented, Dec 9, 2017

@ndelangen apologies for the late response… it’s been a hectic few weeks. I don’t think we will be exploring custom elements/web components for a while (it’s a bit too early for us and we are currently progressing w/ React & Ng only).

Last I checked, the storybook-deployer was working fine w/ 3.3 branch and Ng. The main issue w/ Web Components was the current WC polyfills have some es6 in their distribution which breaks when included w/ the current version of uglify. I had a workaround in my fork for this…

https://github.com/priley86/storybook-angular-demo https://github.com/priley86/storybook-angular

Looks like you are leaving uglify soon enough - so that should help…

I had proposed one other feature recently in Storybook Deployer. Not sure if you are filtering these 😉

Will report back as we progress…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy your storybook as a static site - GitHub
Storybook Deployer. This is a simple tool allows you to deploy your Storybook into a static hosting service. (Currently, GitHub Pages and AWS...
Read more >
Publish Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
What is the correct way to deploy a feature branch of an ...
So I updated my package scripts to this: "build": "ng build --prod --base-href \"/funfair-client/\"", "deploy": "npm run build && npx ...
Read more >
Bitbucket Pipelines - Continuous Delivery
Continuous visibility from backlog to deployment. ... it easier to work with branching workflows like feature branching or git-flow. ... View their story...
Read more >
Everything GitHub: Continuous Integration, Deployment and ...
His Angular Book uses a new GitHub repository in every chapter (so ... GitHub will activate the hosting automatically, if this branch has ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found