Skip to content

Rebuild css modules with defined order #98

Open
@Diokuz

Description

@Diokuz

Hi there)

I wrote a-webpack-plugin which makes it possible to generate super short css classNames, like .a .b... .zz ...
My plugin works with ExtractTextPlugin, and it doesn't with mini-css-extract-plugin (

The problem is that when I rebuild css modules in a proper order, mini-css-extract-plugin
just drops all css files → no css output at all.

https://github.com/Diokuz/a-webpack-plugin/blob/master/index.js#L158

Any suggestions how to fix that?

My plugin's algorythm is very simple:

  1. Wait till all css modules are loaded by webpack
  2. Find them and sort
  3. Rebuild all css modules in a defined order, so build is deterministic (chunkhash and content is constant for particular git commit).

As I understood from your source, you use childCompiler in loader, which is reused in plugin part. But I still dont get it, why compilation.rebuildModule not working...

Thanks in advance)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions