Skip to content

Commit 6ba6c84

Browse files
authored
allow additionalData to be async
This is especially useful if you want to use `loaderContext.resolve` to get additional data through the standard webpack mechanisms.
1 parent b32d7e7 commit 6ba6c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function lessLoader(source) {
3333
if (typeof options.additionalData !== 'undefined') {
3434
data =
3535
typeof options.additionalData === 'function'
36-
? `${options.additionalData(data, this)}`
36+
? `${await options.additionalData(data, this)}`
3737
: `${options.additionalData}\n${data}`;
3838
}
3939

0 commit comments

Comments
 (0)