Skip to content

Commit

Permalink
[node-build-scripts] chore: use non-deprecated syntax to import 'sass' (
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed Jul 5, 2023
1 parent 2e7c2b0 commit 9669182
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/docs/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ for a custom Sass compiler that can import Blueprint `.scss` sources:

```js
import { sassNodeModulesLoadPaths, sassSvgInlinerFactory } from "@blueprintjs/node-build-scripts";
import sass from "sass";
import * as sass from "sass";

const result = await sass.compileAsync("path/to/input.scss", {
loadPaths: sassNodeModulesLoadPaths,
Expand All @@ -118,7 +118,7 @@ In addition to the JS API, you can specify this configuration with Webpack's sas
// webpack.config.mjs

import { sassNodeModulesLoadPaths, sassSvgInlinerFactory } from "@blueprintjs/node-build-scripts";
import sass from "sass";
import * as sass from "sass";

const functions = {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/node-build-scripts/sass-compile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { watch } from "chokidar";
import fsExtra from "fs-extra";
import { basename, extname, join, resolve } from "node:path";
import { argv } from "node:process";
import sass from "sass";
import * as sass from "sass";
import yargs from "yargs";

import { sassCompileFile } from "./src/sass/sassCompileFile.mjs";
Expand Down
2 changes: 1 addition & 1 deletion packages/node-build-scripts/src/sass/sassCompileFile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import fsExtra from "fs-extra";
import { dirname, join, parse as parsePath, relative } from "node:path";
import sass from "sass";
import * as sass from "sass";
import { SourceMapGenerator } from "source-map-js";

import defaultCustomFunctions from "./sassCustomFunctions.mjs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// @ts-check

import sass from "sass";
import * as sass from "sass";

import { sassSvgInlinerFactory } from "./sassSvgInliner.mjs";

Expand Down
2 changes: 1 addition & 1 deletion packages/node-build-scripts/src/sass/sassSvgInliner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { parseDocument } from "htmlparser2";
import svgToDataUri from "mini-svg-data-uri";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import sass from "sass";
import * as sass from "sass";

import { svgOptimizer } from "../svg/svgOptimizer.mjs";

Expand Down

1 comment on commit 9669182

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[node-build-scripts] chore: use non-deprecated syntax to import 'sass' (#6261)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.