jknanda78 / code-splitting-dynamic-routing

A sample application integrated with React router 4 and react-redux-router.
1 stars 0 forks source link

Postcss setup #3

Open msimonc opened 6 years ago

msimonc commented 6 years ago

While bits of the Postcss config are included, postcss.config.js is missing. An example of working sass would be great! Thanks,

msimonc commented 6 years ago

Thanks for the subroutes updates, I'm still unable to get postcss running, thx.

jknanda78 commented 6 years ago

Hello Mark, Thanks again for creating a new issue. Please give me sometime to look into it and respond back.

msimonc commented 6 years ago

Hi JK, The pull request I created allows sass/css to work in a component using: import styles from './styles.css'; In previous projects however, I was able to globally ex.import './static/scss/main.scss'which allowed me to include the style sheets of 3rd party components like react-bootstrap which don't work now.

msimonc commented 6 years ago

For global sass I added the following rule in both dev and prod webpack configs: { test: /.scss$|.sass$/, exclude: /node_modules/, use: [ require.resolve('style-loader'), require.resolve('css-loader'), require.resolve('sass-loader') ] },