import locals from 'style!./styles.scss';
export default locals.styles;
This means that using the style loader alone can eliminate those index.js files altogether; this PR implements that, by adding the style loader to the list of loaders for SCSS files, and the styles are simply imported by the component file via
import { styles } from './styles/styles.scss';
This is implemented by b058baafc0f8bfc2f4cfed794c68a036b0ae3268
Additionally, ff97223a83bff30b1d66796f8483960e57526a5b allows index.scss to be resolved by default, simplifying the filenames when importing local styles. I made this a separate commit specifically since this functionality may not be wanted in this PR.
The style loader exports the value of
.locals
when it loads a file. Said another way, the intermediateindex.js
files that look like the following:could be written as
This means that using the style loader alone can eliminate those
index.js
files altogether; this PR implements that, by adding the style loader to the list of loaders for SCSS files, and the styles are simply imported by the component file viaThis is implemented by b058baafc0f8bfc2f4cfed794c68a036b0ae3268
Additionally, ff97223a83bff30b1d66796f8483960e57526a5b allows
index.scss
to be resolved by default, simplifying the filenames when importing local styles. I made this a separate commit specifically since this functionality may not be wanted in this PR.