question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with webpack-manifest-plugin

See original GitHub issue

When I use this with webpack-manifest-plugin, my manifest ends up like so: With these options:

{
      extract: true,
      spriteFilename: 'sprites.svg',
    }

I get:

{
  "Museo300-Regular-webfont.woff": "2646113a1f5c5ca4728b05d88b276e1e.woff",
  "hero-sample.jpg": "227cbd423e001d2649e678848b207cc8.jpg",
  "index.css": "index.de42babf90fb3ab19717.css",
  "index.js": "index.de42babf90fb3ab19717.js",
  "sprites.svg.svg": "sprites.svg"
}

What I want to see (as you can see I’m getting from file-loader, etc) is:

{
  "sprites.svg": "sprites.a939c9b13b21cd05a5e796ab6ba41769.svg"
}

So there’s 2 issues.

  • The key is getting a duplicate .svg appended
  • I want a source: hashed pair in manifest. I suppose for that you might need another option like chunkSpriteFilename. that you could set to 'sprites.[hash].svg`

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:11
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

21reactions
timkeltycommented, Sep 6, 2017

The key is getting a duplicate .svg appended

@kisenka This issue has been addressed, but the other issue remains, so it still isn’t really usable with webpack-manifest…

The output of manifest.json is now something like:

  "index.js": "index.5aaa0284303daf026ee6.js",
  "sprites.9c565aa8c02d25eb352d121ae26b6b90.svg": "sprites.9c565aa8c02d25eb352d121ae26b6b90.svg"

For it to be useful, we want something like this:

  "index.js": "index.5aaa0284303daf026ee6.js",
  "sprites.svg": "sprites.9c565aa8c02d25eb352d121ae26b6b90.svg"
3reactions
rchesnokovcommented, Jun 4, 2018

@kisenka could you please take a look at the PR? It’s been up for a while. This problem doesn’t allow me to setup correct sprite versioning on my project. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-manifest-plugin - npm
A Webpack Plugin for generating Asset Manifests. Latest version: 5.0.0, last published: 10 months ago. Start using webpack-manifest-plugin ...
Read more >
webpack-manifest-plugin versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >
webpack-manifest-plugin | Yarn - Package Manager
A lot of webpack plugins are not yet updated to match the new webpack 5 API. This is a problem when other plugins...
Read more >
[New to webpack]autoprefix problem with webpack manifest ...
I tried to use webpack manifest plugin to build manifest.json file that has keys and values of my assets with contenthash in its...
Read more >
Upgrading Webpack 4 → 5 | Square Corner Blog
We use the webpack-manifest-plugin plugin to get a list of assets for ... For Webpack 5 compatibility, we replaced i18n-webpack-plugin with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found