Toolkit: support sass style for plugins (#22235)

This commit is contained in:
Jacky 2020-02-16 19:47:31 -05:00 committed by GitHub
parent 90541d3084
commit a743a1cc12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ import { getPluginId } from '../utils/getPluginId';
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const supportedExtensions = ['css', 'scss', 'less'];
const supportedExtensions = ['css', 'scss', 'less', 'sass'];
const getStylesheetPaths = (root: string = process.cwd()) => {
return [`${root}/src/styles/light`, `${root}/src/styles/dark`];
@ -110,7 +110,7 @@ export const getStyleLoaders = () => {
exclude: [`${styleDir}light.css`, `${styleDir}dark.css`],
},
{
test: /\.scss$/,
test: /\.s[ac]ss$/,
use: ['style-loader', ...cssLoaders, 'sass-loader'],
exclude: [`${styleDir}light.scss`, `${styleDir}dark.scss`],
},