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 56514cc commit 0482bd5Copy full SHA for 0482bd5
src/importers/sassTildeImporter.ts
@@ -41,9 +41,13 @@ export const sassTildeImporter: sass.FileImporter<'sync'> = {
41
// Support sass partials by including paths where the file is prefixed by an underscore.
42
const basename = path.basename(nodeModSubpath);
43
if (!basename.startsWith('_')) {
44
- const partials = subpathsWithExts.map((file) =>
45
- file.replace(basename, `_${basename}`),
46
- );
+ const partials = subpathsWithExts.map((file) => {
+ const parts = path.parse(file);
+ const replacement = '_'.concat(parts.name);
47
+ parts.base = parts.base.replace(parts.name, replacement);
48
+ parts.name = replacement;
49
+ return path.format(parts);
50
+ });
51
subpathsWithExts.push(...partials);
52
}
53
0 commit comments