<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">We had a working worker file prior to the update to canary, afterwords we get a 'window is undefined' error and the functionality of our worker is never fired or fulfilled. We are already on the canary of <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-workers">next-workers</a> which has a similar bug fix.</p>
<h2 dir="auto">To Reproduce</h2>
<ol dir="auto">
<li>add <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-workers">next-workers</a>@canary to next.config.js</li>
<li>import a worker file</li>
<li>see that it loads correctly</li>
<li>upgrade to next@canary</li>
<li>visit the page that loads the worker and see window is undefined error.</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expect the worker to load correctly</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: MacOS</li>
<li>Browser: Firefox and Chrome tested</li>
<li>The version of Next.js: Canary</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Didn't know whether to report here or <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-plugins">next-plugins</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Use new Next.js plugin for Preact.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Manually change React for Preact.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">With the release of Next.js v5 the current example with Preact is outdated and can be simplified with the new <a href="https://github.com/zeit/next-plugins/tree/master/packages/next-preact">next-preact</a> plugin.</p>