JedWatson/react-codemirror

How to use with postcss

jacargentina opened this issue · 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.

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'
    ]
  }
]