Preact-cli: MiniCssExtractPlugin uses '[id]' rather than '[name]' for 'chunkFilename'

Created on 8 Dec 2018  路  4Comments  路  Source: preactjs/preact-cli


Do you want to request a feature or report a bug?
bug
What is the current behaviour?
next branch names css chunk files with [id] rather than [name]

If the current behaviour is a bug, please provide the steps to reproduce.
production build using preact build using preact-cli@next

What is the expected behaviour?
files should be named according to their chunk name rather than with a number.

If this is a feature request, what is motivation or use case for changing the behaviour?

Please mention other relevant information.

  • Node version
  • npm version
  • Operating system
  • CLI version: 3.0.0-next.14
  • Browser
bug

All 4 comments

My short-term local workaround is to add the following to my preact config transform

helpers.getPluginsByName(config, 'MiniCssExtractPlugin')
    .forEach(({ plugin }) => plugin.options.chunkFilename = plugin.options.chunkFilename.replace('[id]', '[name]'));

@johnhaitas is this to be closed now?

Yep, cuz it is already merged in next

Thanks all

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hardcoar picture hardcoar  路  3Comments

AlStar01 picture AlStar01  路  3Comments

raphaelbauer picture raphaelbauer  路  3Comments

andybons picture andybons  路  3Comments

yoshiwarab picture yoshiwarab  路  3Comments