electron-userland / electron-userland/electron-webpack

Compile takes too long with large renderer dependency

Open
#96 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Hi guys,

when I try to compile my project using electron-webpack the compile process is kinda stuck at `95% [1] additional asset processing`. I realized this only happens when having a specific module in my `whiteListedModules`.

It was possible for me to reproduce the behaviour by just adding and whitelisting the dependency [pdfkit](https://github.com/devongovett/pdfkit) in the [electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start)-project and putting a simple `const PDFDocument = require('pdfkit')` in the `index.js` of the renderer. If you would like me to I can provide a repository which reproduces the behaviour.

I think it is due to packed fonts in the source code of pdfkit which takes some webpack plugin forever to load. Tried to let the process run overnight yesterday and eventually it compiled but it should by far not take that long.

A workaround or even better a solution to the problem would be appreciated 😊

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.