survivejs / webpack-book

From apprentice to master (CC BY-NC-ND)
https://survivejs.com/webpack/
2.42k stars 319 forks source link

add args to loadCSS call #143

Closed youbiak closed 7 years ago

youbiak commented 7 years ago

function gets undefined for the include rule, code works anyway so I suppose the default is to include all files ?

bebraw commented 7 years ago

Yeah, the include is optional. It's there for convenience in case you want to do different things for different directories. I should expand on that.

Setting include/exclude is more important if you use JavaScript as then webpack will process node_modules by default due to the way module resolution process works. This can lead to some weird behavior and decrease performance as the assumption is that those files have been preprocessed already.

youbiak commented 7 years ago

Exactly my thought, thank you for the quick reply