Skip to content
New issue

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

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

Already on GitHub? # to your account

Images in CSS are not present in manifest but present as versioned files in the production build #8640

Closed
Experiment8 opened this issue Mar 12, 2020 · 2 comments

Comments

@Experiment8
Copy link

Describe the bug

When importing a third party CSS the images/files are correctly extracted and versioned during production build, but they're not declared in the manifest.

Steps to reproduce

  1. Create a plain new CRA project;
  2. Add for E.g semantic UI dependency (yarn add semantic-ui-css);
  3. Add the import in the index.js:
import 'semantic-ui-css/semantic.min.css';
  1. Run yarn build;

Expected behavior

Taking for instance the image themes/default/assets/images/flags.png present in the CSS, I would expect it to be in build/static/media/flags.<hash>.png and the reference to be in the manifest.

Actual behavior

The image file with the hash is created:

image

But the manifest has no trace of it, and actually the entire semantic CSS file is considered as a font file for some reason:

{
  "files": {
    "main.css": "/static/css/main.d1b05096.chunk.css",
    "main.js": "/static/js/main.8ef6347a.chunk.js",
    "main.js.map": "/static/js/main.8ef6347a.chunk.js.map",
    "runtime-main.js": "/static/js/runtime-main.a572b363.js",
    "runtime-main.js.map": "/static/js/runtime-main.a572b363.js.map",
    "static/css/2.0252c3bb.chunk.css": "/static/css/2.0252c3bb.chunk.css",
    "static/js/2.ff88bdeb.chunk.js": "/static/js/2.ff88bdeb.chunk.js",
    "static/js/2.ff88bdeb.chunk.js.map": "/static/js/2.ff88bdeb.chunk.js.map",
    "index.html": "/index.html",
    "precache-manifest.c5fae06b3368a7ffe489fd22aa8bdfae.js": "/precache-manifest.c5fae06b3368a7ffe489fd22aa8bdfae.js",
    "service-worker.js": "/service-worker.js",
    "static/css/2.0252c3bb.chunk.css.map": "/static/css/2.0252c3bb.chunk.css.map",
    "static/css/main.d1b05096.chunk.css.map": "/static/css/main.d1b05096.chunk.css.map",
    "static/js/2.ff88bdeb.chunk.js.LICENSE.txt": "/static/js/2.ff88bdeb.chunk.js.LICENSE.txt",
    "static/media/semantic.min.css": "/static/media/outline-icons.ef60a4f6.woff",
    "static/media/logo.svg": "/static/media/logo.5d5d9eef.svg"
  },
  "entrypoints": [
    "static/js/runtime-main.a572b363.js",
    "static/css/2.0252c3bb.chunk.css",
    "static/js/2.ff88bdeb.chunk.js",
    "static/css/main.d1b05096.chunk.css",
    "static/js/main.8ef6347a.chunk.js"
  ]
}
@stale
Copy link

stale bot commented Apr 11, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Apr 11, 2020
@stale
Copy link

stale bot commented Apr 17, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Apr 17, 2020
@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant