Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ async function prerender (parentCompilation, request, options, inject, loader) {
window.requestAnimationFrame = () => ++counter;
window.cancelAnimationFrame = () => { };

// Patch window.TextEncoder/window.TextDecoder (which are now standard in modern browsers) with node implementations
window.TextEncoder = require('util').TextEncoder
window.TextDecoder = require('util').TextDecoder

// Never prerender Custom Elements: by skipping registration, we get only the Light DOM which is desirable.
window.customElements = {
define () {},
Expand Down