Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(updated link to compiler options for scss & sass) #542

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

aarondiel
Copy link
Contributor

hint for where to find additional sass / scss compiler options.

this was very confusing for me, since the docs suggest that you can pass importers to the sass preprocessor and gave a different type definition from what svelte-preprocess expects.

taking the following code snippet from the current sass docs does not work:

preprocess({
  scss: {
    importers: [{
      // An importer that redirects relative URLs starting with "~" to
      // `node_modules`.
      findFileUrl(url) {
        if (!url.startsWith('~')) return null;
        return new URL(url.substring(1), pathToFileURL('node_modules'));
      }
    }]
  }
})

while something like this would:

preprocess({
  scss: {
    importer: (url) => {
      console.log(url)

      return {
        file: url
      }
    }]
  }
})

i hope this is only a temporary fix for when svelte-preprocess moves to a newer sass version

@dummdidumm
Copy link
Member

Thank you! I added "move to new SASS API" to the list of the next major release planning (#504)

@dummdidumm dummdidumm merged commit 81f0b13 into sveltejs:main Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants