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.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
gvocalecommented, Jul 25, 2020

Still an issue 😓

0reactions
stale[bot]commented, Oct 12, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asset compilation - Advanced use - Ember CLI Guides
When working on an Ember app, sometimes you may want to customize how certain kinds of assets are handled. This is referred to...
Read more >
Ember CLI build index.html outside assets folder
I've gotten my Ember app to build into the public folder under the express app and I can even change the name if...
Read more >
Understanding Ember.js Public Assets Path for Browser and ...
I wrote this blog post without fully understanding the reasoning behind ember rewriting urls, fingerprinting and the TIL <base /> tag, ...
Read more >
Understanding Ember.js Public Asset Path - Alberto Cantu
I wrote this blog post without fully understanding the reasoning behind ember rewriting urls, fingerprinting and the TIL <base /> tag, the simple...
Read more >
Story rendering - Storybook
It's also possible to modify the preview head HTML programmatically using a preset defined in the main.js file. For more information see Preview/Manager ......
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