Problem/Motivation

The generated CSS files include source map references, but the corresponding source map files are not provided.

As a result, when the affected CSS assets are loaded, the browser attempts to request the missing source map files and returns 404 responses. This causes the following warnings in the browser console or network tab:

Failed to load resource: the https://MY_SITE/modules/contrib/ckeditor_bs_grid/css/grid.css.map server responded with a status of 404 ()
Failed to load resource: the https://MY_SITE/modules/contrib/ckeditor_bs_grid/css/dialog.css.map server responded with a status of 404 ()

The affected files are:

  • css/dialog.css
  • css/grid.css

These warnings do not necessarily break the visual output, but they create unnecessary failed requests and noise in the browser developer tools.

Steps to reproduce

  1. Install and enable the project.
  2. Open a page or interface where the affected CSS assets are loaded.
  3. Open the browser developer tools.
  4. Check the Console or Network tab.
  5. Observe that the browser tries to load the missing source map files for dialog.css and grid.css.
  6. Observe that those requests return 404 responses.

Proposed resolution

Update the CSS build process so that source maps are not generated or referenced in the compiled CSS output.

The patch does the following:

  • Adds the --no-source-map option to the Sass compilation commands in package.json.
  • Removes the existing sourceMappingURL reference from css/dialog.css.
  • Removes the existing sourceMappingURL reference from css/grid.css.

This prevents the browser from requesting missing .css.map files and removes the related 404 warnings.

Remaining tasks

  • Review the patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lolgm created an issue. See original summary.

lolgm’s picture

Status: Active » Needs review
StatusFileSize
new214.24 KB

The proposed solution for this issue has been implemented in MR !36.

I am also attaching the corresponding patch to this comment.

b_sharpe’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.