Coder Social home page Coder Social logo

Comments (10)

rshackleton avatar rshackleton commented on June 15, 2024 7

Experiencing the same issue as mentioned in webpack-contrib/mini-css-extract-plugin#38, have narrowed the issue down to this plugin.

ERROR in chunk main [entry]
main-86b47c44b7412f8548be.css
Cannot read property 'chunkFilename' of undefined

from chunk-manifest-webpack-plugin.

outshineamaze avatar outshineamaze commented on June 15, 2024 3

#59 we can use this, which support webpack 4.8.3 +

from chunk-manifest-webpack-plugin.

fightingtheboss avatar fightingtheboss commented on June 15, 2024 3

I ended up removing my dependency on this package in favour of using HtmlWebpackPlugin with the following configs:

// webpack.config.js
...
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'webpack-common-manifest.json',
      template: 'manifest/template.html',
      inject: false,
    }),
  ],
<%# manifest/template.html %>
<%= JSON.stringify(webpack.assetsByChunkName) %>

This produced a JSON manifest referencing all chunks. You can use any of the other options for HtmlWebpackPlugin to select or exclude chunks, order, etc.

from chunk-manifest-webpack-plugin.

IAMtheIAM avatar IAMtheIAM commented on June 15, 2024

Yes please, webpack 4 looks like it has many good features, we need chunk manifest plugin :-)

from chunk-manifest-webpack-plugin.

iki avatar iki commented on June 15, 2024

@malectro's branch seems to address this https://github.com/malectro/chunk-manifest-webpack-plugin/tree/webpack-4

from chunk-manifest-webpack-plugin.

bf avatar bf commented on June 15, 2024

Any update on this issue? Waiting to use it with webpack 4.

from chunk-manifest-webpack-plugin.

4lph4-Ph4un avatar 4lph4-Ph4un commented on June 15, 2024

@fightingtheboss, is some part of that configuration missing? What makes webpack -object accessible from that template.html?

from chunk-manifest-webpack-plugin.

fightingtheboss avatar fightingtheboss commented on June 15, 2024

That variable is provided by HtmlWebpackPlugin while rendering the template. You can see documentation on that at the bottom of this section: https://github.com/jantimon/html-webpack-plugin#writing-your-own-templates

Turns out there's a much simpler solution to this problem though, simply use this plugin: https://github.com/danethurber/webpack-manifest-plugin. No need for a custom template in that case.

from chunk-manifest-webpack-plugin.

4lph4-Ph4un avatar 4lph4-Ph4un commented on June 15, 2024

Ah! So it seems! I somehow missed that assuming it was solely for stats -object! Thanks for the trick! :) Unfortunately webpack-manifest-plugin is out of scope for me, since it has another compatibility issues currently related to my other configs (mainly splitChunks: 'all').

from chunk-manifest-webpack-plugin.

niemyjski avatar niemyjski commented on June 15, 2024

Can we get one of the pr's for this merged in. Some look better than others... Can't even npm install after upgrading to npm4 or 5.

from chunk-manifest-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.