Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

fix(dev-bundler): styles loader #571

Merged
merged 1 commit into from
Sep 28, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* permissions and limitations under the License.
*/

import * as sass from 'sass';
import { compile as sassCompile } from 'sass';
import postcss from 'postcss';
import cssModules from 'postcss-modules';
import crypto from 'crypto';
Expand All @@ -40,7 +40,7 @@ const stylesLoader = (cssModulesOptions = {}, { bundleType } = {}) => ({
// Compile scss to css
let cssContent;
if (args.path.endsWith('scss')) {
cssContent = sass.compile(args.path, { loadPaths: ['./node_modules'] }).css.toString();
cssContent = sassCompile(args.path, { loadPaths: ['./node_modules'] }).css.toString();
} else {
cssContent = await fs.promises.readFile(args.path, 'utf8');
}
Expand Down
Loading