Storybook: Ember: "preview-head.html" generates paths as "assets./" instead of "./assets/"

Created on 19 Jun 2020  路  6Comments  路  Source: storybookjs/storybook

After running in my Ember 3.18 app folder:

npx -p @storybook/cli sb init

the file .storybook/preview-head.html gets created, but many paths wrongly starts with assets./ rather then ./assets/

<link rel="icon" href="./assets/favicon.png" />
<link rel="apple-touch-icon" href="./assets/apple-touch-icon.png" />
<link rel="stylesheet" href="assets./vendor.css" />
<link rel="stylesheet" href="assets./app.css" />
<script src=".//cdn.polyfill.io/v3/polyfill.min.js?features=es5,fetch,Object.values,Object.entries&flags=gated"></script>
<script>
            (function() {
              var srcUrl = null;
              var host = location.hostname || 'localhost';
              var defaultPort = location.protocol === 'https:' ? 443 : 80;
              var port = 9001;
              var path = '';
              var prefixURL = '';
              var src = srcUrl || prefixURL + '/_lr/livereload.js?port=' + port + '&host=' + host + path;
              var script = document.createElement('script');
              script.type = 'text/javascript';
              script.src = location.protocol + '//' + host + ':9001' + src;
              document.getElementsByTagName('head')[0].appendChild(script);
            }());
          </script>
<script src="assets./vendor.js"></script>
<script src="assets./app.js"></script>

I have to manually edit .storybook/preview-head.html and fix the paths, otherwise storybook opens blank, without error in console.

Screen Shot 2020-06-18 at 11 16 10 PM

ember help wanted inactive question / support

Most helpful comment

Still an issue 馃槗

All 6 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Still an issue 馃槗

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

According to https://github.com/storybookjs/ember-cli-storybook/blob/d4acc9604425c5770ea25608d143e1e0dc05c3e2/index.js#L65 it uses your index.html as basis to and appends a snippet required for storybook to run. If the path are wrong, I assume that is because they are that way in your index.html.

I found that build step interessting, so here is the integration method for this: https://github.com/storybookjs/ember-cli-storybook/blob/d4acc9604425c5770ea25608d143e1e0dc05c3e2/index.js#L53 quite readable to process it manually and understand it. Helps to trace down your bug.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

purplecones picture purplecones  路  3Comments

levithomason picture levithomason  路  3Comments

zvictor picture zvictor  路  3Comments

tirli picture tirli  路  3Comments

alexanbj picture alexanbj  路  3Comments