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

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Jan 30, 2020

Adds indexes to GitHub-only stylesheets that aren't covered by #5539.

Copy link
Collaborator

@abhiomkar abhiomkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the build is failing for mdc-image-list.

loader/src??ref--4-2!./node_modules/sass-loader/lib/loader.js??ref--4-3!./test/screenshot/spec/mdc-image-list/fixture.scss) Module build failed (from ./node_modules/sass-loader/lib/loader.js): @forward "@material/feature-targeting" as mdc-feature-*; ^ Can't find stylesheet to import. ╷ 1 │ @forward "@material/feature-targeting" as mdc-feature-*; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ packages/mdc-image-list/_mixins.import.scss 1:1 @import stdin 23:9 root stylesheet 

Can you replace @import with @use in test/screenshot/spec/mdc-image-list/fixture.scss file to see if that fixes the issue?

@nex3
Copy link
Contributor Author

nex3 commented Jan 31, 2020

Looks like that did it 🤷‍♀️.

@abhiomkar abhiomkar merged commit 3a85313 into material-components:master Jan 31, 2020
@abhiomkar
Copy link
Collaborator

@nex3 Any idea why Sass was not able to resolve module when @import statement is used?

Material Web Components (MWC) is still using @import statements and it broke their Sass build.

/cc @e111077 @dfreedm

@trimox
Copy link
Contributor

trimox commented Feb 3, 2020

@abhiomkar I may have stumbled on similar issue upgrading Angular MDC to v5.0-canary branch. If a component package folder contains index.ts along with _index.scss the build fails.

Works successfully with @use '@material/checkbox/_index' as checkbox;

Fails to compile using @use '@material/checkbox'; or @use '@material/checkbox' as checkbox;
image

Edit: Since @material/button does not contain index.ts the use of @use '@material/button'; compiles fine.

@nex3 nex3 deleted the remaining-indexes branch February 4, 2020 00:15
@nex3
Copy link
Contributor Author

nex3 commented Feb 4, 2020

Does anyone have a reproduction that just uses the command-line Sass compiler, so I can debug into it and see what's going wrong here?

@abhiomkar
Copy link
Collaborator

abhiomkar commented Feb 4, 2020

This* surely looks like sass-loader bug when handling index file.

I'm able to reproduce only with sass-loader (Webpack Sass plugin):
https://github.com/abhiomkar/sass-module-bug

@abhiomkar
Copy link
Collaborator

Created bug with sass-loader.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 participants