<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">Bug: the single quotes are escaped when they shouldn't be in this code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Head&gt;
  &lt;style&gt;{`
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/img/bg.jpg');
  }
  `}&lt;/style&gt;
&lt;/Head&gt;"><pre class="notranslate"><code class="notranslate">&lt;Head&gt;
  &lt;style&gt;{`
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/img/bg.jpg');
  }
  `}&lt;/style&gt;
&lt;/Head&gt;
</code></pre></div>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">This is rendered as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  &lt;style class=&quot;next-head&quot;&gt;
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(&amp;#x27;/static/img/bg.jpg&amp;#x27;);
  }
  &lt;/style&gt;"><pre class="notranslate"><code class="notranslate">  &lt;style class="next-head"&gt;
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(&amp;#x27;/static/img/bg.jpg&amp;#x27;);
  }
  &lt;/style&gt;
</code></pre></div>
<p dir="auto">Which is incorrect.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>See above code</li>
</ol>
<h2 dir="auto">Context</h2>


<p dir="auto">This makes using URL resources or fonts with spaces in  CSS close to impossible.</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.2.1</td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(node:30515) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'reasons' of undefined
    at /Users/project/node_modules/next/dist/server/hot-reloader.js:445:37
    at Array.map (&lt;anonymous&gt;)
    at Compiler.&lt;anonymous&gt; (/Users/project/node_modules/next/dist/server/hot-reloader.js:444:79)
    at Compiler.applyPlugins (/Users/project/node_modules/tapable/lib/Tapable.js:61:14)
    at Watching._done (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:104:17)
    at compiler.emitRecords.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:78:19)
    at Compiler.emitRecords (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:375:38)
    at compiler.emitAssets.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:61:20)
    at applyPluginsAsyncSeries1.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.afterEmit (/Users/project/node_modules/stylelint-webpack-plugin/lib/run-compilation.js:52:5)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at Compiler.&lt;anonymous&gt; (/Users/project/node_modules/next/dist/server/hot-reloader.js:432:19)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at Compiler.compiler.plugin (/Users/project/node_modules/next/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at /Users/project/node_modules/next/dist/server/build/plugins/unlink-file-plugin.js:98:18
    at &lt;anonymous&gt;
(node:30515) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30515) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."><pre class="notranslate"><code class="notranslate">(node:30515) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'reasons' of undefined
    at /Users/project/node_modules/next/dist/server/hot-reloader.js:445:37
    at Array.map (&lt;anonymous&gt;)
    at Compiler.&lt;anonymous&gt; (/Users/project/node_modules/next/dist/server/hot-reloader.js:444:79)
    at Compiler.applyPlugins (/Users/project/node_modules/tapable/lib/Tapable.js:61:14)
    at Watching._done (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:104:17)
    at compiler.emitRecords.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:78:19)
    at Compiler.emitRecords (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:375:38)
    at compiler.emitAssets.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:61:20)
    at applyPluginsAsyncSeries1.err (/Users/project/node_modules/next/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.afterEmit (/Users/project/node_modules/stylelint-webpack-plugin/lib/run-compilation.js:52:5)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at Compiler.&lt;anonymous&gt; (/Users/project/node_modules/next/dist/server/hot-reloader.js:432:19)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at Compiler.compiler.plugin (/Users/project/node_modules/next/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at next (/Users/project/node_modules/tapable/lib/Tapable.js:220:14)
    at /Users/project/node_modules/next/dist/server/build/plugins/unlink-file-plugin.js:98:18
    at &lt;anonymous&gt;
(node:30515) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30515) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
</code></pre></div>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">stylelint-webpack-plugin should work with webpack config defined in next.config.js</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The stylelint-webpack-plugin complains about an uncaught property 'reasons' and displays the initial linting warnings/errors. Not working for subsequent reloads as a result</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Install stylelint, stylelint-webpack-plugin</li>
<li>Configure StyleLintPlugin in next.config.js</li>
<li>Run program and observe error after webpack config is loaded in</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Linting usage for dev purposes</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>9.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>macos</td>
</tr>
</tbody>
</table>