openedx / openedx/frontend-component-header
SassError when importing as a part of `localModules` in `module.config.js`
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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