Skip to content

Commit

Permalink
Revert "build: stop suffixing XModule SCSS with hashes (#32288)"
Browse files Browse the repository at this point in the history
This reverts commit cef8c06.
  • Loading branch information
kdmccormick committed Jun 7, 2023
1 parent 40613ae commit d05931a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion xmodule/static_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ def _write_styles(selector, output_root, classes, css_attribute, suffix):
))
module_styles_lines.extend(f' @import "{name}";' for name in fragment_names)
module_styles_lines.append('}')
file_hash = hashlib.md5("".join(fragment_names).encode('ascii')).hexdigest()

contents[f"{class_.__name__}{suffix}.scss"] = '\n'.join(module_styles_lines)
contents[f"{class_.__name__}{suffix}.{file_hash}.scss"] = '\n'.join(module_styles_lines)

_write_files(output_root, contents)

Expand Down
6 changes: 3 additions & 3 deletions xmodule/util/xmodule_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def load_assets(self):
'path': '/openedx/edx-platform/common/static/bundles/AnnotatableBlockPreview.js.map'
},
{
'name': 'AnnotatableBlockPreview.css',
'path': 'common/static/css/xmodule/AnnotatableBlockPreview.css',
'publicPath': '/static/css/xmodule/AnnotatableBlockPreview.css'
'name': 'AnnotatableBlockPreview.85745121.css',
'path': 'common/static/css/xmodule/AnnotatableBlockPreview.85745121.css',
'publicPath': '/static/css/xmodule/AnnotatableBlockPreview.85745121.css'
}
],
...
Expand Down

0 comments on commit d05931a

Please sign in to comment.