google-fonts-webpack-plugin icon indicating copy to clipboard operation
google-fonts-webpack-plugin copied to clipboard

Does not work in RsPack

Open vitexikora opened this issue 8 months ago • 1 comments

RsPack is plugin-compatible with WebPack however this plugin does not work there.

I could patch this line compilation.namedChunks.set(this.options.name, this.chunk); to compilation.namedChunks[this.options.name] = this.chunk;

Which fixes build, however the font files created are corrupted (possibly from being handled as text; they are polluted with a byte sequence of EF BF BD).

vitexikora avatar Apr 07 '25 11:04 vitexikora

Managed to fix it. Needed to replace your bundled RawSource with compiler.webpack.sources.RawSource.

If you can release it, so it does not have to patched, that would be nice :)

vitexikora avatar Apr 07 '25 12:04 vitexikora