Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Impossible to build project with Parcel or Rollup #547

Closed
layershifter opened this issue Nov 30, 2018 · 2 comments · Fixed by #570
Closed

Impossible to build project with Parcel or Rollup #547

layershifter opened this issue Nov 30, 2018 · 2 comments · Fixed by #570
Labels
🧰 bug Something isn't working vsts Paired with ticket in vsts

Comments

@layershifter
Copy link
Member

Bug Report

The same problem as in #497.

Steps

  1. Prepare project
git clone https://github.com/rollup/rollup-starter-app
cd rollup-starter-app
yarn
yarn add @stardust-ui/react react react-dom
yarn dev
  1. Paste code
import React from "react";
import ReactDOM from "react-dom";
import { Button, Provider, themes } from "@stardust-ui/react";

ReactDOM.render(
  React.createElement(
    Provider,
    { theme: themes.teams },
    React.createElement(Button, {
      content: "Theming",
      icon: "arrow right",
      iconPosition: "after",
      primary: true
    })
  ),
  document.getElementById("root")
);

Expected Result

Everything works.

Actual Result

image

Version

0.13.0

@layershifter
Copy link
Member Author

It happens because we importing classnames as namespace in dist code, however classnames exports default instead of namespace.

Fix:

-import * as cx from 'classnames'
+import cx from 'classnames'

DefinitelyTyped/DefinitelyTyped#25205
DefinitelyTyped/DefinitelyTyped#25206

@layershifter
Copy link
Member Author

palantir/blueprint#2221
palantir/blueprint#2200

However, not sure that it's the best idea to change tsconfig.json in this case.

@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Nov 30, 2018
@levithomason levithomason added 🧰 bug Something isn't working and removed 🧰 bug Something isn't working labels Nov 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 bug Something isn't working vsts Paired with ticket in vsts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants