Merge pull request #1917 from strapi/fix-build

Fix build
This commit is contained in:
Jim LAURIE 2018-09-07 17:44:31 +02:00 committed by GitHub
commit c9cdab31d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 37 additions and 27 deletions

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ import ListPluginsPage from 'containers/ListPluginsPage/Loadable';
import Logout from 'components/Logout';
import NotFoundPage from 'containers/NotFoundPage/Loadable';
import OverlayBlocker from 'components/OverlayBlocker';
import PluginPage from 'containers/PluginPage/Loadable';
import PluginPage from 'containers/PluginPage';
// Utils
import auth from 'utils/auth';

View File

@ -69,6 +69,7 @@ module.exports = {
'reactstrap': path.resolve(rootAdminpath, 'node_modules', 'strapi-helper-plugin', 'node_modules', 'reactstrap'),
'react-dnd': path.resolve(rootAdminpath, 'node_modules', 'strapi-helper-plugin', 'node_modules', 'react-dnd'),
'react-dnd-hmtl5-backend': path.resolve(rootAdminpath, 'node_modules', 'strapi-helper-plugin', 'node_modules', 'react-dnd-html5-backend'),
'styled-components': path.resolve(rootAdminpath, 'node_modules', 'strapi-helper-plugin', 'node_modules', 'styled-components'),
},
symlinks: false,
extensions: [

View File

@ -238,11 +238,5 @@ module.exports = base({
devtool: 'cheap-module-source-map',
disableExtractTextPlugin: false,
externals: {
'styled-components': {
commonjs: 'styled-components',
commonjs2: 'styled-components',
amd: 'styled-components',
},
},
externals: {},
});

View File

@ -137,7 +137,7 @@ class InputFile extends React.Component {
position={this.state.position}
updateFilePosition={this.updateFilePosition}
/>
<label style={{"margin-bottom": 0, width: '100%'}}>
<label style={{ marginBottom: 0, width: '100%' }}>
<input
className={styles.inputFile}
multiple={multiple}

View File

@ -44,10 +44,10 @@ class InputFileWithErrors extends React.PureComponent {
this.updateState({ label: null });
}
// Check if errors have been updated during validations
if (nextProps.didCheckErrors !== this.props.didCheckErrors) {
if (prevProps.didCheckErrors !== this.props.didCheckErrors) {
// Remove from the state the errors that have already been set
const errors = isEmpty(nextProps.errors) ? [] : nextProps.errors;
this.setState({ errors });
const errors = isEmpty(this.props.errors) ? [] : this.props.errors;
this.updateState({ errors });
}
}

View File

@ -5,13 +5,28 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.scss';
const LoadingIndicatorPage = () => {
const LoadingIndicatorPage = (props) => {
if (props.error) {
console.log(props.error);
return <div>An error occurred</div>;
}
return (
<div className={styles.loaderPage}><div /></div>
);
};
LoadingIndicatorPage.defaultProps = {
error: null,
};
LoadingIndicatorPage.propTypes = {
error: PropTypes.object,
};
export default LoadingIndicatorPage;

View File

@ -109,7 +109,7 @@
"sass-loader": "^6.0.6",
"shelljs": "^0.7.8",
"style-loader": "^0.18.2",
"styled-components": "^3.2.6",
"styled-components": "3.2.6",
"url-loader": "^0.5.9",
"webpack": "^3.5.5",
"webpack-bundle-analyzer": "^2.9.0",