When babel injects polyfills for Set proposals (specifically, the addAll method proposal) in the server render compiled code, those polyfills are evaluated by requireFromString while Webpack's file watcher (which evaluates the presence of addAll in Set to gather file paths) is reporting file changes. This makes it throw an error.
Would it be an acceptable workaround to wrap getServerRenderer in a function, in order to delay requireFromString until the middleware is run?
Hello,
Following this Webpack issue.
When
babel
injects polyfills forSet
proposals (specifically, theaddAll
method proposal) in the server render compiled code, those polyfills are evaluated byrequireFromString
while Webpack's file watcher (which evaluates the presence ofaddAll
inSet
to gather file paths) is reporting file changes. This makes it throw an error.Would it be an acceptable workaround to wrap
getServerRenderer
in a function, in order to delayrequireFromString
until the middleware is run?Ie. here:
And here:
And here: