Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: UMD bundle for core not getting built #1643

Closed
1 task
nstuyvesant opened this issue Aug 8, 2023 · 0 comments · Fixed by #1644
Closed
1 task

[Bug]: UMD bundle for core not getting built #1643

nstuyvesant opened this issue Aug 8, 2023 · 0 comments · Fixed by #1644

Comments

@nstuyvesant
Copy link
Contributor

nstuyvesant commented Aug 8, 2023

Name

Nate Stuyvesant

Are you an IBM employee?

  • Yes

What happened?

When core is built via vite, it is creating es and cjs versions. It should have been building es and umd.

I will submit a PR to fix this. Otherwise, this documented approach to loading Carbon Charts will not work...

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="@carbon/styles/css/styles.css" />
    <link rel="stylesheet" href="https://unpkg.com/@carbon/charts/styles.css" />
  </head>
  <body>
    <div id="my-bar-chart"></div>

    <script src="https://unpkg.com/@carbon/charts/dist/umd/bundle.umd.js"></script>

    <script>
      // grab chart holder DOM element
      const chartHolder = document.getElementById('my-bar-chart')

      const stackedBarData = [
        // refer to tabular data format tutorial
      ]

      const stackedBarOptions = {
        // refer to chart specific options
      }

      // initialize the chart
      new CarbonCharts.StackedBarChart(chartHolder, {
        data: stackedBarData,
        options: stackedBarOptions,
      })
    </script>
  </body>
</html>

Version

@carbon/charts@1.11.17

What priority level would this be in your opinion?

P0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant