Is your feature request related to a problem? Please describe.
I'm using react-snap for prerendering root route in my CRA2 app. If inlineCss: true option is set, react-snap timeouts in docker container without any console error.
Describe the solution you'd like
After some debugging, I've found that if minimalcss skips this code, build doesn't hang in docker container and everything is OK:
"reactSnap": {
"minimalcss": {
withoutjavascript: false
// and other minimalcss options
}
}
Describe alternatives you've considered
I'm aware that this may not address the real issue that causes the build to hang in docker. I bet that it is caused by some weird Puppeteer behavior in docker container.
I've also tried some combinations of react-snap options, like fixWebpackChunksIssue: "CRA2" etc, but that didn't help.
Teachability, Documentation, Adoption, Migration Strategy
At a quick glance, that change shouldn't break anything and is straightforward to implement.
Feature Request
Is your feature request related to a problem? Please describe. I'm using react-snap for prerendering root route in my CRA2 app. If
inlineCss: true
option is set, react-snap timeouts in docker container without any console error.Describe the solution you'd like After some debugging, I've found that if minimalcss skips this code, build doesn't hang in docker container and everything is OK:
https://github.com/peterbe/minimalcss/blob/3cfacd75093d852f82763c75cc0dded0c04460c2/src/run.js#L286-L296
It'd be great for react-snap users to have the ability to override the default minimalcss options, that are used in inlineCss function:
https://github.com/stereobooster/react-snap/blob/b741d41e484dea1fd7160ef455b63ca5d401f747/index.js#L270-L276 It'd look something like this:
Describe alternatives you've considered I'm aware that this may not address the real issue that causes the build to hang in docker. I bet that it is caused by some weird Puppeteer behavior in docker container. I've also tried some combinations of react-snap options, like
fixWebpackChunksIssue: "CRA2"
etc, but that didn't help.Teachability, Documentation, Adoption, Migration Strategy At a quick glance, that change shouldn't break anything and is straightforward to implement.