Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sideEffects: false changes rules order in production #501

Closed
Hypnosphi opened this issue Feb 18, 2020 · 1 comment
Closed

sideEffects: false changes rules order in production #501

Hypnosphi opened this issue Feb 18, 2020 · 1 comment

Comments

@Hypnosphi
Copy link

Maybe related: #188 #202

  • Operating System: Mac OS Catalina
  • Node Version: 12.15.0
  • NPM Version: 6.13.4
  • webpack Version: 4.41.4
  • mini-css-extract-plugin Version: 0.9.0

Expected Behavior

Rules order is consistent between development and production

Actual Behavior

Rule order is defined by imports order in development, and by usage order in production

Code / How Do We Reproduce?

https://github.com/Hypnosphi/style-loader-duplicates/tree/mcep

Note that I import a before b, but use b before a. This leads to text being red in dev and blue in prod

import {a} from './a.css'
import {b} from './b.css'

document.body.innerHTML = `<div class="${b} ${a}">Text</div>`
@alexander-akait
Copy link
Member

Please open the issue in webpack, it is out of scope this plugin

@Hypnosphi Hypnosphi changed the title sideEffects: true changes rules order in production sideEffects: false changes rules order in production Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants