Skip to content

Commit

Permalink
fix: avoid crash when a file imported in SCSS does not exist (#4505)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Aug 5, 2021
1 parent 420d82d commit a03e944
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Expand Up @@ -998,7 +998,9 @@ const scss: SassStylePreprocessor = async (
const internalImporter: Sass.Importer = (url, importer, done) => {
resolvers.sass(url, importer).then((resolved) => {
if (resolved) {
rebaseUrls(resolved, options.filename, options.alias).then(done)
rebaseUrls(resolved, options.filename, options.alias)
.then(done)
.catch(done)
} else {
done(null)
}
Expand Down

0 comments on commit a03e944

Please sign in to comment.