Skip to content

reproducing bug 25 #36

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"private": true,
"scripts":{
"dev": "webpack-dev-server"
},
"dependencies": {
"babel-plugin-react-css-modules": "^2.1.3",
"react": "^15.4.1",
Expand Down
11 changes: 11 additions & 0 deletions demo/src/components/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @file Demonstrates anonymous "styleName" resolution.
* @see https://github.com/gajus/babel-plugin-react-css-modules#anonymous-stylename-resolution
*/

import React from 'react';
import 'home.css';

export default () => {
return <div><h1 styleName="home">this is a title</h1></div>
};
1 change: 1 addition & 0 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDom from 'react-dom';
import AnonymouseStyleResolution from './components/AnonymouseStyleResolution';
import NamedStyleResolution from './components/NamedStyleResolution';
import RuntimeStyleResolution from './components/RuntimeStyleResolution';
import Home from 'Home';

ReactDom.render(<div>
<AnonymouseStyleResolution />
Expand Down
3 changes: 3 additions & 0 deletions demo/src/sass/home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.home{
color: gray
}
8 changes: 8 additions & 0 deletions demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ const context = path.resolve(__dirname, 'src');
module.exports = {
context,
entry: './index.js',
resolve: {
modules: [
'src',
'src/sass',
'src/components',
'node_modules'
]
},
module: {
loaders: [
{
Expand Down
Loading