Skip to content

CSS Order Differs Between Development & Production Modes when Treeshaking. #7094

@brycehill

Description

@brycehill

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
CSS seems to be out of order in "development" vs "production" mode. It appears somehow related to sideEffects and tree shaking.

If the current behavior is a bug, please provide the steps to reproduce.

Here's a repo demonstrating the issue: https://github.com/brycehill/webpack-css-order.

There are instructions in the readme. Basically, if you build in development mode, the outputted CSS is different from production mode.

What is the expected behavior?
CSS order is consistent from one environment to another.

I don't want to depend on a specific CSS order, but I do expect it to be consistent from when I develop to when I build for production.

If this is a feature request, what is motivation or use case for changing the behavior?
N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Node: v8.9.1
Webpack: v4.6.0
OS: MacOS High Sierra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Priority - High

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions