Closed antonfrolovsky closed 6 years ago
Works on my machine. Clearly you can't expect more from such a bug report.
@sapegin I have ReactRedux project with Emotion
All works but not VIEW CODE
index.js
import Button from './Button';
export default Button;
Button.styles.js
import styled from 'react-emotion';
const styles = {};
styles.Button = styled('button')`
width: 100px;
height: 30px;
`;
export default styles;
Button.js
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import s from './Button.style';
class Button extends PureComponent {
static propTypes = {
align: PropTypes.string,
};
static defaultProps = {
align: null,
};
render() {
const { children, align, ...buttonProps } = this.props;
return (
<s.Button {...buttonProps}>
{children && typeof children === 'string' ? children : ''}
</s.Button>
);
}
}
export default Button;
styleguidist.config.js
module.exports = {
title: 'META Components',
components: './source/components/UIkit/**/[A-Z]*.js',
ignore: ['**/*.style.js'],
skipComponentsWithoutExample: true,
};
Maybe this error because of webpack version, i think but not sure.
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11",
"webpack-dev-server": "^3.1.1",
The thing is it works for all other users, so likely something is different in your project. But without a demo I can't say anything. I use Styleguidist with Emotion without any issues.
Same issue here. Looks like the recent webpack upgrade broke it.
When click VIEW CODE