Lemoncode / webpack-1.x-by-sample

Learn webpack 1.x by sample
http://www.lemoncode.net/
MIT License
27 stars 17 forks source link

Changes for 01 Styles / 01 Custom CSS #33

Closed crsanti closed 6 years ago

crsanti commented 8 years ago

Hi, i found some changes we could do:

  • Configure webpackconfig.

We could change this to Configure webpack.config.js.

Prerequisites, you will need to have nodejs installed in your computer. If you want to follow this guide you will need to take as starting point sample "00 Intro/03 Jquery"

End sentene with a full stop and change sample to 00 Intro / 04 Jquery.

.redbkg {
  background-color:  red
}

Add trailing semicolon, also in students.js. :P

import {getAvg} from "./averageService";

$('body').css('background-color', 'blue');

const scores = [90, 75, 60, 99, 94, 30];
...

In the previous students.js inside sample 00 Intro / 04 Jquery we have this code. However after we add redbkg class the figure shows this:

Demo01_00_CSS.png

There's no blue background because the jQuery line was removed. This should be notified.

In next demos we will learn how to ask webpack to separate the css into separate files, depending on your scenario you could choose one way or the other.

How does this sound?

In next demos we will learn how to ask webpack to separate our styles from bundle.js into separate css output file, depending on your scenario you could choose one way or the other.

linuxonrails commented 7 years ago

I think, this issue should be closed :-/

crsanti commented 6 years ago

Closed in favor of #54