react-codemirror icon indicating copy to clipboard operation
react-codemirror copied to clipboard

How to use with postcss

Open jacargentina opened this issue 8 years ago • 1 comments

Using postcss in my React app, and then when i do

import codemirrorstyles from 'codemirror/lib/coremirror.css'

the classes are already processed, so there is no class CodeMirror, etc.

jacargentina avatar Jun 23 '17 16:06 jacargentina

You just need to import it without postcss processing. Add following rule to your webpack config:

rules: [
  ...
  {
    test: /node_modules\/.*\.css$/,
    use: [
      'style-loader',
      'css-loader'
    ]
  }
]

vpotravnyy avatar Aug 22 '17 04:08 vpotravnyy