Skip to content

Commit

Permalink
step 1 - load styles
Browse files Browse the repository at this point in the history
  • Loading branch information
bognix committed Feb 26, 2017
1 parent c5e01a7 commit 1feec04
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 3 additions & 0 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
import './styles.css';


console.log('I AM LOADED');
3 changes: 3 additions & 0 deletions example/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background: red;
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"babel-cli": "^6.23.0",
"babel-loader": "^6.3.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.2",
"style-loader": "^0.13.2",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1"
}
Expand Down
19 changes: 14 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ module.exports = {
filename: 'bundle.js',
},
module: {
loaders: [
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}]
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},{
test: /\.css$/,
use: [
{
loader: 'style-loader'
}, {
loader: 'css-loader'
}
]}
]
}
};

0 comments on commit 1feec04

Please sign in to comment.