Skip to content

Commit 77e7a8b

Browse files
refactor: load neo-async lazily (#1147)
1 parent fb4217c commit 77e7a8b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import url from "url";
22
import path from "path";
33

4-
import async from "neo-async";
5-
64
function getDefaultSassImplementation() {
75
let sassImplPkg = "sass";
86

@@ -706,6 +704,9 @@ function getCompileFn(implementation, options) {
706704
// We need to use a job queue to make sure that one thread is always available to the UV lib
707705
if (nodeSassJobQueue === null) {
708706
const threadPoolSize = Number(process.env.UV_THREADPOOL_SIZE || 4);
707+
// Only used for `node-sass`, so let's load it lazily
708+
// eslint-disable-next-line global-require
709+
const async = require("neo-async");
709710

710711
nodeSassJobQueue = async.queue(
711712
implementation.render.bind(implementation),

0 commit comments

Comments
 (0)