You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I observed that rollup tree shaking did not work using rollup.js and the following import: import Menu from 'semantic-ui-react' import Header from 'semantic-ui-react'
It also seems that rollup is breaking a subset of the mass imports where the 'react.createElement(ElementType' first parameter string was being substituted to '_default'; (for example Radio.js) which must be a consequence of pattern
index.js: import _default from './Radio'; export { _default as default };
I've worked around the issue by using: import Menu from '../../node_modules/semantic-ui-react/dist/es/collections/Menu/Menu' import Header from '../../node_modules/semantic-ui-react/dist/es/elements/Header/Header'
instead.
It's certainly possible that this is a issue with rollup, rather than es target. But I'm leaving the bug here to encourage investigation on why the es target does not work; since my workaround is sufficient to unblock developers, but it's still an issue that others will likely run into.
The text was updated successfully, but these errors were encountered:
import { Header, Menu } from 'semantic-ui-react'
confirmed same broken results. The typo version was a failed workaround in my edit history, this must've been the original docs cut-and-paste.
I observed that rollup tree shaking did not work using rollup.js and the following import:
import Menu from 'semantic-ui-react'
import Header from 'semantic-ui-react'
It also seems that rollup is breaking a subset of the mass imports where the 'react.createElement(ElementType' first parameter string was being substituted to '_default'; (for example Radio.js) which must be a consequence of pattern
index.js:
import _default from './Radio';
export { _default as default };
I've worked around the issue by using:
import Menu from '../../node_modules/semantic-ui-react/dist/es/collections/Menu/Menu'
import Header from '../../node_modules/semantic-ui-react/dist/es/elements/Header/Header'
instead.
It's certainly possible that this is a issue with rollup, rather than es target. But I'm leaving the bug here to encourage investigation on why the es target does not work; since my workaround is sufficient to unblock developers, but it's still an issue that others will likely run into.
The text was updated successfully, but these errors were encountered: