Last active
April 8, 2022 15:29
-
-
Save ahobson/54a22effca99167f0f219155584de840 to your computer and use it in GitHub Desktop.
cra 5.0 + sass + uswds = ???
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx create-react-app uswds-sccs-test | |
$ yarn add sass uswds nprogress | |
$ mv src/App.css src/App.scss | |
# edit App.js to change App.css to App.scss | |
$ yarn build | |
# everything is ok | |
$ echo "@import '~nprogress/nprogress';" >> src/App.scss | |
$ yarn build | |
# everything is ok | |
$ echo "@import '~uswds/src/stylesheets/theme/_uswds-theme-general.scss';" >> src/App.scss | |
$ yarn build | |
... | |
Failed to compile. | |
SassError: Can't find stylesheet to import. | |
╷ | |
41 │ @import '~uswds/src/stylesheets/theme/_uswds-theme-general.scss'; | |
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
╵ | |
src/App.scss 41:9 root stylesheet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now changing
App.scss
to be the following doesn't work