csstools / csstools/postcss-normalize

ForceImport works wrong

Ouverte
#44 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
CSS
Étoiles
837
Forks
40
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### How To Reproduce:
1) create a basic project with webpack 4 and postcss
2) for postcss-normalize set ```forceImport: true``` option
3) in entry file add several imports "[someName].css"
4) build project
https://github.com/Yegorich555/FromScratch_React/tree/postcss-forceImport-bug - for this link use npm run build-dev;
5) look into main.css file

### Actual behavior
We have postcssNormalize result as many as we have css imports in main.js
https://www.screencast.com/t/uBP6hZegP

### Expected behavior
```forceImport``` should inject normalize-result once independently on the number of css imports into main.js. Also, this reason why it also doesn't work with *.vue files since ones have several css import (scoped and global)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduce the issue with the linked project by running npm run build-dev, then inspect main.css after adding several CSS imports in the entry file. Trace how forceImport is applied in the webpack/PostCSS setup; done means the normalize result is injected only once, including when multiple scoped and global CSS imports come from a Vue file.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
css, webpack
Domaine
build-system, frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.