Skip to content

Why use "new ExtractTextPlugin()" twice and how it works? #519

Description

@shakaIsReal

1. I am confused why you choose to use new ExtractTextPlugin('styles/main.css', { allChunks: true })
both on server and client in webpack.config.prod.js. Wouldn't styles/main.css be overwritten by the last execution (2nd one)? As I understand we only need one styles/main.css in our public folder. Why have two? Or do

new webpack.optimize.OccurenceOrderPlugin(),
new ExtractTextPlugin('styles/main.css', { allChunks: true }) 

do something magical together?

2. Can you also explain how ExtractTextPlugin works? Does it only get the style(s) from the entry file or it takes all styles from other components and bundles `em together?

3. Does postCSS/postcss-loader compile sass, so I dont need to use sass-loader?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions