Babel Compile CSS files Babel Compile CSS files express express

Babel Compile CSS files


The webpack config looks correct.Probably issue with import of CSS, it has to be smtl like that:

import './style.css'; where './' is path.

If you want to write CSS for every component, I suggest you take a look CSS Modules https://github.com/css-modules/css-modules


If you are using webpack-dev-middleware you need to ensure you configure it with your webpack config:

const webpack = require('webpack');const webpackDevMiddleware = require('webpack-dev-middleware');const webpackConfig = require('path/to/webpack.config.js');const compiler = webpack(webpackConfig);module.exports = webpackDevMiddleware(compiler, { /* options */ }