We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1e00f2 commit c3d410bCopy full SHA for c3d410b
src/helpers/getClasses.ts
@@ -1,3 +1,4 @@
1
+import path from 'path';
2
import postcss from 'postcss';
3
import less from 'less';
4
import sass from 'sass';
@@ -17,8 +18,7 @@ export const getFileType = (fileName: string) => {
17
18
return FileTypes.scss;
19
};
20
-const getFilePath = (fileName: string) =>
21
- fileName.substring(0, fileName.lastIndexOf('/'));
+const getFilePath = (fileName: string) => path.dirname(fileName);
22
23
export const getClasses = (
24
processor: postcss.Processor,
@@ -71,7 +71,6 @@ export const getClasses = (
71
72
return processedCss.root ? extractICSS(processedCss.root).icssExports : {};
73
} catch (e) {
74
- console.log(e);
75
logger.error(e);
76
return {};
77
}
0 commit comments