Skip to content

Commit

Permalink
Merge pull request #205 from mkusaka/fix-error
Browse files Browse the repository at this point in the history
Resolved an error that occurs when using with sass 1.60.x
  • Loading branch information
mizdra authored Jun 12, 2023
2 parents 0fb9ecd + daa7f95 commit 616b1cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"postcss-scss": "^4.0.6",
"postcss-simple-vars": "^7.0.1",
"prettier": "~2.7.1",
"sass": "^1.54.3",
"sass": "^1.63.3",
"stylelint": "^15.4.0",
"tsc-watch": "^5.0.3",
"typescript": "^5.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function promisifySassRender(sass: typeof import('sass')) {
export const createScssTransformer: () => Transformer = () => {
let sass: typeof import('sass');
return async (source, options) => {
sass ??= (await import('sass').catch(handleImportError('sass'))).default;
const sassModule = await import('sass').catch(handleImportError('sass'));
sass ??= sassModule.default ?? sassModule;
const render = promisifySassRender(sass);
const result = await render({
data: source,
Expand Down

0 comments on commit 616b1cf

Please sign in to comment.