Skip to content

Instantly share code, notes, and snippets.

@SooJungChae
Created October 15, 2018 08:52
Show Gist options
  • Save SooJungChae/498758cafe99a9560ee173fa7405938d to your computer and use it in GitHub Desktop.
Save SooJungChae/498758cafe99a9560ee173fa7405938d to your computer and use it in GitHub Desktop.
How to import css in webpack react project
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