coryhouse / pluralsight-redux-starter

Completed Dev Environment for "Building Applications with React and Redux" on Pluralsight
https://app.pluralsight.com/library/courses/react-redux-react-router-es6/
1.27k stars 914 forks source link

Issue with CSS loading #97

Closed mcrivar closed 6 years ago

mcrivar commented 6 years ago

Hi,

I'm using windows while following along with the course and now after finishing the App structure and running it with npm start -s the CSS fails to load, the CSS's I have issue loading with is the one from bootstrap. Just wonder maybe some loader is missing in the webpack.config.dev.js? Its the same you have here, but in your case I haven't seen you get the issue with the CSS there.

thanks!

coryhouse commented 6 years ago

Are you using the same versions as I am in this repo to assure you can follow along? If that doesn't help, can you share your repo on GitHub so I can give it a glance?

mcrivar commented 6 years ago

Hey Cory, thanks for the fast reply.

Sure, here is the link: https://github.com/Mcrivar/react-pluralsight

I saw that you made some updates for webpack 2 and more changes in the package versions, maybe that is the reason?

coryhouse commented 6 years ago

To follow along with the course you need to use the versions I use in the final demo under exercise files. Are you?

mcrivar commented 6 years ago

Are you referring to react-redux-react-router-es6-m14-exercise-files/demo?

I wasn't using this, i was just going along with the video course and got into that error at the Initial App structure part in the course.

If that's the one I need to use I will swap it, just didn't think I need to have the last files :/

coryhouse commented 6 years ago

Yes, I'm referring to that as the final exercise.

But my core question was whether your solution is using the same versions in package.json.

coryhouse commented 6 years ago

Hrmm, I see your point. At a glance I don't see anything wrong with your solution. It should be loading CSS. Investigating...

coryhouse commented 6 years ago

Ah! Easy fix: Change your bootstrap import in index.js to this:

import "../node_modules/bootstrap/dist/css/bootstrap.min.css";

:)

mcrivar commented 6 years ago

Oh so simple -.-' thanks!

Doyler123 commented 6 years ago

I had the same issue, I don't see the bootstrap added in the video and it seems to work just fine. Did you find out why this was needed? Just curious as I spent ages trying to figure it out.

Thanks

coryhouse commented 6 years ago

The import is necessary so the bootstrap css is loaded in the app by Webpack.