Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Bug: the single quotes are escaped when they shouldn't be in this code:

<Head>
<style>{`
body {
display: flex;
align-items: center;
justify-content: center;
background: url('/static/img/bg.jpg');
}
`}</style>
</Head>

Current Behavior

This is rendered as:

<style class="next-head">
body {
display: flex;
align-items: center;
justify-content: center;
background: url(&#x27;/static/img/bg.jpg&#x27;);
}
</style>

Which is incorrect.

Steps to Reproduce (for bugs)

See above code

Context

This makes using URL resources or fonts with spaces in CSS close to impossible.

Your Environment

Tech
Version

next
3.2.1

node

OS

browser

etc

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

(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 (<anonymous>)
at Compiler.<anonymous> (/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.<anonymous> (/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 <anonymous>
(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.

Expected Behavior

stylelint-webpack-plugin should work with webpack config defined in next.config.js

Current Behavior

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

Steps to Reproduce (for bugs)

Install stylelint, stylelint-webpack-plugin

Configure StyleLintPlugin in next.config.js

Run program and observe error after webpack config is loaded in

Context

Linting usage for dev purposes

Your Environment

Tech
Version

next
5.0.0

node
9.4.0

OS
macos