add a hack to handle sass resolution in svelte in external workspace

This commit is contained in:
Damien Elmes 2021-05-20 15:32:06 +10:00
parent e2b2d1e9d8
commit 84e2cfbe3f

View file

@ -151,7 +151,17 @@ async function writeJs(
genDir: string
): Promise<void> {
const preprocessOptions = preprocess({
scss: { includePaths: [binDir, genDir] },
scss: {
includePaths: [
binDir,
genDir,
// a nasty hack to ensure ts/sass/... resolves correctly
// when invoked from an external workspace
binDir + "/external/net_ankiweb_anki",
genDir + "/external/net_ankiweb_anki",
binDir + "/../../../external/net_ankiweb_anki",
],
},
});
preprocessOptions.filename = inputFilename;