Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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