Skip to content

Commit 83e33cc

Browse files
mikesurowiecsarahs
andauthored
Quiet sass warnings (github#19960)
* npm install sass@latest * add quietDeps: true to webpack config * prevent error message from hmr abort, cleans up the log Co-authored-by: Sarah Schneider <[email protected]>
1 parent 74c46de commit 83e33cc

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

middleware/abort.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = function abort (req, res, next) {
22
// If the client aborts the connection, send an error
33
req.once('aborted', () => {
4+
// ignore aborts from next, usually has to do with webpack-hmr
5+
if (req.path.startsWith('/_next')) {
6+
return
7+
}
48
// NOTE: Node.js will also automatically set `req.aborted = true`
59

610
const abortError = new Error('Client closed request')

next.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ const languages = require('./lib/languages')
44
module.exports = {
55
// speed up production `next build` by ignoring typechecking during that step of build.
66
// type-checking still occurs in the Dockerfile build
7+
future: {
8+
webpack: 5,
9+
},
710
typescript: {
811
ignoreBuildErrors: true
912
},
1013
i18n: {
1114
locales: Object.values(languages).map(({ code }) => code),
1215
defaultLocale: 'en'
1316
},
17+
sassOptions: {
18+
quietDeps: true
19+
},
1420
async rewrites () {
1521
const DEFAULT_VERSION = 'free-pro-team@latest'
1622
return productIds.map((productId) => {

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"resolve-url-loader": "^4.0.0",
164164
"rimraf": "^3.0.2",
165165
"robots-parser": "^2.3.0",
166-
"sass": "^1.34.0",
166+
"sass": "^1.35.1",
167167
"sass-loader": "^11.1.1",
168168
"start-server-and-test": "^1.12.2",
169169
"strip-ansi": "^7.0.0",

stylesheets/bump-link.scss

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
@use "sass:math";
2+
13
// Arrow links
24
.Bump-link-symbol {
35
display: inline-block;
4-
transition: $transition-time / 2;
6+
transition: math.div($transition-time, 2);
57
transform: translateX(0);
68
}
79

@@ -12,7 +14,7 @@
1214
.Bump-link--hover .Bump-link-symbol {
1315
color: inherit;
1416
opacity: 0;
15-
transition: $transition-time / 2;
17+
transition: math.div($transition-time, 2);
1618
transform: translateX(0);
1719
}
1820

webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module.exports = {
4747
loader: 'sass-loader',
4848
options: {
4949
sassOptions: {
50+
quietDeps: true,
5051
includePaths: ['./stylesheets', './node_modules'],
5152
options: {
5253
sourceMap: true,

0 commit comments

Comments
 (0)