Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法与 reactcss 结合起来 #103

Closed
yozman opened this issue Aug 2, 2015 · 7 comments
Closed

无法与 reactcss 结合起来 #103

yozman opened this issue Aug 2, 2015 · 7 comments

Comments

@yozman
Copy link
Contributor

yozman commented Aug 2, 2015

想接合 reactcss 来使用,
但是 antd server 之后,
访问 http://localhost:8000/ 样式不生效

import ReactCSS from 'reactcss';

class Button extends ReactCSS.Component {
    classes() {
        return {
            'default': {
                btn: {
                    color: 'red'
                }
            }
        }
    }
    render() {
        return <div is="btn">hello world</div>;
    }
}

React.render(<Button />, document.body);
@afc163
Copy link
Member

afc163 commented Aug 3, 2015

应该是需要 react-map-styles 这个 loader 。

现在应该是支持自己配置 webpack.config.js 的吧?@sorrycc

@yozman
Copy link
Contributor Author

yozman commented Aug 5, 2015

@afc163 怎么弄?

@sorrycc
Copy link
Contributor

sorrycc commented Aug 6, 2015

  • @afc163 react-map-styles 要不要内置?
  • @yozman 在项目目录下写一个 webpack.config.js,把 react-map-styles 加上,antd 命令会先读这个的

@afc163
Copy link
Member

afc163 commented Aug 6, 2015

这些 loader 内置不完的,能用 config 自定义就好。

@sorrycc
Copy link
Contributor

sorrycc commented Aug 6, 2015

@sorrycc sorrycc closed this as completed Aug 6, 2015
@yozman
Copy link
Contributor Author

yozman commented Aug 7, 2015

@sorrycc

@lock
Copy link

lock bot commented May 7, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants