cannot include css files from node_modules on webpack

171 views Asked by At

I am trying to include some modules that require their own css files in my server render react project and i cant seem to get it to work. FYI that modules are react-material-grid and react-toolbox

I am using https://github.com/Hashnode/mern-starter as my project and i am trying to put react toolbox while i am getting an error when trying to run that i cannot properly read a css from that module. You can see the configs of the webpack inside on that project or below

React-toolbox installation https://www.npmjs.com/package/react-toolbox

error i am getting

/node_modules/react-toolbox/lib/ripple/theme.css:1
(function (exports, require, module, __filename, __dirname) { :root {
                                                              ^
SyntaxError: Unexpected token :

babel webpack config https://raw.githubusercontent.com/Hashnode/mern-starter/master/webpack.config.babel.js

dev https://raw.githubusercontent.com/Hashnode/mern-starter/master/webpack.config.dev.js

Any suggestions?

Thanks in advance

0

There are 0 answers