Created
October 15, 2018 08:52
-
-
Save SooJungChae/498758cafe99a9560ee173fa7405938d to your computer and use it in GitHub Desktop.
How to import css in webpack react project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: __dirname + "/app/Main.js", | |
output: { | |
path: __dirname + "/public", | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
loader: 'babel', | |
query:{ | |
cacheDirectory: true, | |
presets: ['react','es2015'] | |
} | |
}, { | |
test: /\.css$/, | |
loader: 'style!css', | |
use: [ 'style-loader', 'css-loader' ] | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment