Skip to content

including requirejs into storybook head breaks tocbot #380

@herrKlein

Description

@herrKlein

In storybook you can add other scripts or tags in the preview head html.
I need requirejs in storybook for some components which need requirejs.

If I add the require lib as script to the preview tocbot generates this error: tocbot.init is not a function and does not work

preview-head.html

<script
  src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"
  integrity="sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg=="
  crossorigin="anonymous"
  referrerpolicy="no-referrer"
></script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions