Commit 567d981e authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Fix external CSS imports (#2680)

* Fix external CSS imports

* Add external CSS import to integration test

* Fix assertion
parent 7b5a589f
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 16 additions and 0 deletions
+16 -0
......@@ -219,6 +219,9 @@ module.exports = {
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
......
......@@ -228,6 +228,9 @@ module.exports = {
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
......
......@@ -6,6 +6,7 @@
"chai": "3.5.0",
"jsdom": "9.8.3",
"mocha": "3.2.0",
"normalize.css": "7.0.0",
"prop-types": "15.5.6",
"test-integrity": "1.0.0"
}
......
......@@ -17,6 +17,9 @@ describe('Integration', () => {
expect(
doc.getElementsByTagName('style')[0].textContent.replace(/\s/g, '')
).to.match(/html\{/);
expect(
doc.getElementsByTagName('style')[1].textContent.replace(/\s/g, '')
).to.match(/#feature-css-inclusion\{background:.+;color:.+}/);
});
......
/*
* Ensure CSS inclusion doesn't regress
* https://github.com/facebookincubator/create-react-app/issues/2677
*/
@import '~normalize.css/normalize.css';
#feature-css-inclusion {
background: palevioletred;
color: papayawhip;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment