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

StatsWriterPlugin? #16

Open
ZebraFlesh opened this issue Feb 21, 2020 · 1 comment
Open

StatsWriterPlugin? #16

ZebraFlesh opened this issue Feb 21, 2020 · 1 comment

Comments

@ZebraFlesh
Copy link

ZebraFlesh commented Feb 21, 2020

Does this plugin work with the webpack-stats-plugin? Once I include media-query-splitting I see the files in the output folder on disk, but they aren't showing up in the webpack stats object (so I can't transform them and then load them into the HTML file I'm generating).

edit: Here's the entire stats object I'm receiving in my transform function:

{
  assetsByChunkName: {
    main: [
      'index.5f4730ed.css',
      'index.573e07e5.js',
      'index.573e07e5.js.map'
    ]
  }
}
{
  assetsByChunkName: {
    main: [
      'index-legacy.5f4730ed.css',
      'index-legacy.3fe56758.js',
      'index-legacy.3fe56758.js.map'
    ]
  }
}
@sergionsz
Copy link

It also doesn't work with webpack-bundle-tracker, which is necessary for this to work with django-webpack-loader.
The assets do show in compilation stats when using the option --json=compilation-stats.json, but they don't appear to belong to any chunk name, which is why I think the files generated with this plugin are not being recognized by any stats package:

{
  "name": "css/main.2e58273f1e81233664d0.css",
  "size": 193743,
  "chunks": [6],
  "chunkNames": ["main"],
  "info": {
    "immutable": true
  },
  "emitted": true
}, {
  "name": "css/main.desktop.fd69067b6db4eae2aa024e3c208c5322bf1f608e.css",
  "size": 34880,
  "chunks": [],
  "chunkNames": [],
  "info": {},
  "emitted": true
},

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