[Solved] Importing css from node_modules during SSR

Hi,

I’m trying to load the css for react-table during the server render of my app. The path to the css file is react-table/react-table.css.

How can I load this so it’s applied during the server side render?

I’m using meteor 1.8.2, so I was under the impression I could put this

    "nodeModules": {
      "recompile": {
        "react-table": true
      }
    }

in my package config, and then just @import it in the css file, but that’s not working - it never finds the file.

I’ve solved this.

meteor add juliancwirko:postcss
meteor remove standard-minifier-css
meteor npm install --save-dev postcss-easy-import
meteor npm install --save-dev postcss@6.0.22 postcss-load-config@1.2.0

add

  "postcss": {
    "plugins": {
      "postcss-easy-import": {}
    }
  },

to package.json

Add

@import "react-table/react-table.css";

to your main.css