openedx / openedx/frontend-component-header

SassError when importing as a part of `localModules` in `module.config.js`

Open
#259 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10
Forks
193
Avg merge
25d 8h
Merged PRs (30d)
1

Description

when importing this module locally by following the pattern from https://github.com/openedx/frontend-build#local-module-configuration-for-webpack, i encountered a sass import error

SassError: Can't find stylesheet to import.
[...]
@import '~@edx/frontend-component-header/dist/index';

after talking to @arbrandes, i learned this was a known issue, and that the current workaround is to modify the @import in the .scss file to point to the local directory instead of ~@edx/frontend-component-header/dist/index

while this workaround is useful, it'd be much better to figure out what's preventing this from working as intended.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the local-module configuration pattern in module.config.js and the .scss file containing the @import of @edx/frontend-component-header/dist/index. Reproduce the SassError while importing the module through localModules, then trace why the local directory workaround is required; done means the intended import works without changing the SCSS import path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sass
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.