Commit caab8076 authored by Evan Read's avatar Evan Read

Remove node-sass-magic-importer

parent d0f3a0ed
......@@ -2,13 +2,41 @@
const { statSync } = require('fs');
const path = require('path');
const glob = require('glob');
const sass = require('sass');
const { buildIncludePaths, resolveGlobUrl } = require('node-sass-magic-importer/dist/toolbox');
const webpack = require('webpack');
const IS_EE = require('../../config/helpers/is_ee_env');
const IS_JH = require('../../config/helpers/is_jh_env');
const gitlabWebpackConfig = require('../../config/webpack.config');
const buildIncludePaths = (nodeSassIncludePaths, previouslyResolvedPath) => {
const includePaths = [];
if (path.isAbsolute(previouslyResolvedPath)) {
includePaths.push(path.dirname(previouslyResolvedPath));
}
return [...new Set([...includePaths, ...nodeSassIncludePaths.split(path.delimiter)])];
};
const resolveGlobUrl = (url, includePaths = []) => {
const filePaths = new Set();
if (glob.hasMagic(url)) {
includePaths.forEach((includePath) => {
const globPaths = glob.sync(url, { cwd: includePath });
globPaths.forEach((relativePath) => {
filePaths.add(
path
.resolve(includePath, relativePath)
// This fixes a problem with importing absolute paths on windows.
.split(`\\`)
.join(`/`),
);
});
});
return [...filePaths];
}
return null;
};
const ROOT = path.resolve(__dirname, '../../');
const TRANSPARENT_1X1_PNG =
'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==)';
......
......@@ -15,7 +15,6 @@
"@storybook/addon-essentials": "^6.2.9",
"@storybook/vue": "6.2.9",
"graphql-tag": "^2.12.5",
"node-sass-magic-importer": "^5.3.2",
"postcss-loader": "3.0.0",
"sass": "^1.49.9",
"sass-loader": "^7.1.0",
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment