Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 668fada

Browse files
clydinfilipesilva
authored andcommitted
fix(@angular-devkit/build-angular): disable sourcemaps with JS styles
1 parent 7d3ee3c commit 668fada

File tree

1 file changed

+6
-1
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+6
-1
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
236236
rules.push(...baseRules.map(({ test, use }) => {
237237
const extractTextPlugin = {
238238
use: [
239-
{ loader: RawCssLoader },
239+
// style-loader still has issues with relative url()'s with sourcemaps enabled;
240+
// even with the convertToAbsoluteUrls options as it uses 'document.location'
241+
// which breaks when used with routing.
242+
// Once style-loader 1.0 is released the following conditional won't be necessary
243+
// due to this 1.0 PR: https://github.com/webpack-contrib/style-loader/pull/219
244+
{ loader: buildOptions.extractCss ? RawCssLoader : 'raw-loader' },
240245
{
241246
loader: 'postcss-loader',
242247
options: {

0 commit comments

Comments
 (0)