Skip to content

Commit

Permalink
BUGFIX: Prevent webpack from bundling react-ui-components twice
Browse files Browse the repository at this point in the history
Some modules referred to the components via

```js
import { /* ... */  } from '@neos-project/react-ui-components';
```

This caused webpack to pull the components from
'@neos-project/react-ui-components/lib-esm' rather than
'@neos-project/react-ui-components/src', leading to the
component modules being bundled twice.

The solution was to change those reference to an explicit:

```js
import { /* ... */  } from '@neos-project/react-ui-components/src';
```

Now the `react-ui-components` are only bundled once.
  • Loading branch information
grebaldi committed Jun 12, 2023
1 parent bfd2024 commit b13d470
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {connect} from 'react-redux';
import {$get, $transform} from 'plow-js';
import LinkInput from '@neos-project/neos-ui-editors/src/Library/LinkInput';

import {IconButton} from '@neos-project/react-ui-components';
import {IconButton} from '@neos-project/react-ui-components/src';
import {neos} from '@neos-project/neos-ui-decorators';
import {selectors, actions} from '@neos-project/neos-ui-redux-store';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';

import {IconButton} from '@neos-project/react-ui-components';
import {IconButton} from '@neos-project/react-ui-components/src';
import mergeClassNames from 'classnames';
import {neos} from '@neos-project/neos-ui-decorators';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DropDown, CheckBox, Button} from '@neos-project/react-ui-components';
import {DropDown, CheckBox, Button} from '@neos-project/react-ui-components/src';
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {$get} from 'plow-js';
Expand Down
4 changes: 2 additions & 2 deletions packages/neos-ui-editors/src/EditorEnvelope/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import ReactMarkdown from 'react-markdown';
import omit from 'lodash.omit';

import Label from '@neos-project/react-ui-components/src/Label/';
import {Tooltip} from '@neos-project/react-ui-components';
import {Tooltip} from '@neos-project/react-ui-components/src';
import I18n from '@neos-project/neos-ui-i18n';
import {neos} from '@neos-project/neos-ui-decorators';

import style from './style.css';

import {Icon} from '@neos-project/react-ui-components';
import {Icon} from '@neos-project/react-ui-components/src';

@neos(globalRegistry => ({
editorRegistry: globalRegistry.get('inspector').get('editors'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import mergeClassNames from 'classnames';
import {AssetUpload} from '../../../../Library/index';

import {Thumbnail} from '../../Utils/index';
import {Icon} from '@neos-project/react-ui-components';
import {Icon} from '@neos-project/react-ui-components/src';
import style from './style.css';

export default class PreviewScreen extends PureComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import unescape from 'lodash.unescape';
import slugify from '@sindresorhus/slugify';
import {neos} from '@neos-project/neos-ui-decorators';
import {TextInput, IconButton} from '@neos-project/react-ui-components';
import {TextInput, IconButton} from '@neos-project/react-ui-components/src';
import style from './style.css';

const defaultOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui-editors/src/Library/LinkInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {$get, $transform} from 'plow-js';

import {IconButton, SelectBox, Icon} from '@neos-project/react-ui-components';
import {IconButton, SelectBox, Icon} from '@neos-project/react-ui-components/src';
import LinkOption from '@neos-project/neos-ui-editors/src/Library/LinkOption';
import {neos} from '@neos-project/neos-ui-decorators';
import backend from '@neos-project/neos-ui-backend-connector';
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui-editors/src/Library/LinkInputOptions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Fragment} from 'react';
import {$get} from 'plow-js';

import {TextInput, CheckBox} from '@neos-project/react-ui-components';
import {TextInput, CheckBox} from '@neos-project/react-ui-components/src';

import style from './LinkInput.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {connect} from 'react-redux';
import {$transform} from 'plow-js';
import {selectors} from '@neos-project/neos-ui-redux-store';
import {neos} from '@neos-project/neos-ui-decorators';
import {Tooltip} from '@neos-project/react-ui-components';
import {Tooltip} from '@neos-project/react-ui-components/src';
import throttle from 'lodash.throttle';
import style from './style.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {connect} from 'react-redux';
import {$get} from 'plow-js';
import mergeClassNames from 'classnames';

import {Tree, Icon} from '@neos-project/react-ui-components';
import {Tree, Icon} from '@neos-project/react-ui-components/src';

import {actions, selectors} from '@neos-project/neos-ui-redux-store';
import {SelectionModeTypes} from '@neos-project/neos-ts-interfaces';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import {$get} from 'plow-js';

import {neos} from '@neos-project/neos-ui-decorators';
import {SelectBox} from '@neos-project/react-ui-components';
import {SelectBox} from '@neos-project/react-ui-components/src';

import {searchOptions} from '@neos-project/neos-ui-editors/src/Editors/SelectBox/SelectBoxHelpers.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import {TextInput, Icon, IconButton} from '@neos-project/react-ui-components';
import {TextInput, Icon, IconButton} from '@neos-project/react-ui-components/src';
import mergeClassNames from 'classnames';

import style from './style.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import mergeClassNames from 'classnames';
import {neos} from '@neos-project/neos-ui-decorators';
import {actions, selectors} from '@neos-project/neos-ui-redux-store';

import {IconButton} from '@neos-project/react-ui-components';
import {IconButton} from '@neos-project/react-ui-components/src';
import NodeTreeSearchInput from './NodeTreeSearchInput/index';
import NodeTreeFilter from './NodeTreeFilter/index';
import style from './style.css';
Expand Down
2 changes: 1 addition & 1 deletion packages/neos-ui/src/apiExposureMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as reactCssThemr from '@friendsofreactjs/react-css-themr';
import * as ReactDND from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';

import ReactUiComponents from '@neos-project/react-ui-components';
import ReactUiComponents from '@neos-project/react-ui-components/src';
import * as NeosUiReduxStore from '@neos-project/neos-ui-redux-store';
import * as NeosUiDecorators from '@neos-project/neos-ui-decorators';
import * as NeosUiEditors from '@neos-project/neos-ui-editors/src/index';
Expand Down

0 comments on commit b13d470

Please sign in to comment.