Skip to content

Commit

Permalink
feat(@angular-devkit/build-angular): drop support for node-sass
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Support for `node-sass` has been removed. `sass` will be used by default to compile SASS and SCSS files.
  • Loading branch information
alan-agius4 authored and filipesilva committed Jul 30, 2021
1 parent b2411ef commit ac3fc27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,14 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
);
}

let sassImplementation: SassWorkerImplementation | undefined;
try {
sassImplementation = require('node-sass');
wco.logger.warn(
`'node-sass' usage is deprecated and will be removed in a future major version. ` +
`To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'.`,
);
} catch {
sassImplementation = new SassWorkerImplementation();
extraPlugins.push({
apply(compiler) {
compiler.hooks.shutdown.tap('sass-worker', () => {
sassImplementation?.close();
});
},
});
}
const sassImplementation = new SassWorkerImplementation();
extraPlugins.push({
apply(compiler) {
compiler.hooks.shutdown.tap('sass-worker', () => {
sassImplementation?.close();
});
},
});

const assetNameTemplate = assetNameTemplateFactory(hashFormat);

Expand Down
55 changes: 0 additions & 55 deletions tests/legacy-cli/e2e/tests/build/styles/node-sass.ts

This file was deleted.

0 comments on commit ac3fc27

Please sign in to comment.