Package documentation on npmjs.org: Clarify how to import the fiori-fundamentals SCSS file
See original GitHub issueWhen I use create-react-app to create a new React app - which is the way how apps are created in the React tutorial:
npx create-react-app my-app
cd my-app
npm start
and I install fundamentals-react
according to its documentation on npmjs.com
npm install --save fiori-fundamentals # fiori-fundamentals@1.4.1
npm install --save fundamental-react # fundamental-react@0.0.14
and I include the Fiori Fundamentals CSS in my React application by including the following lines at the top of the file src/App.css
as stated on the package page:
$fd-icons-path: "~fiori-fundamentals/scss/icons/";
$fd-fonts-path: "~fiori-fundamentals/scss/fonts/";
@import '../node_modules/fiori-fundamentals/scss/all.scss';
then I get an error in my browser (Chrome version 71.0):
I’m playing the React.js rookie by following the documentation, please excuse me if this issue is trivial to solve…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to import SASS through npm ? - GeeksforGeeks
First, download the latest version of a node in the system and install it. Now go to command prompt and address the folder...
Read more >Importing Sass through npm - node.js - Stack Overflow
Then in your main scss file you can use: @import "~some-module/sass/app"; ... You can include the files from package using @import "my-cool-package/super- ...
Read more >How to use SAP Fundamentals SCSS with Angular
Type npm install fiori-fundamentals --save-dev . This will install the package as a dev dependency. Verify the installation was successful by typing npm...
Read more >import-scss - npm
Tool which imports new scss modules to your main scss file.. Latest version: 0.1.3, last published: 3 years ago. Start using import-scss in ......
Read more >Beginner Guide to Vue.js With SAP Fiori Fundamental [Step ...
Detailed explanations are in the 'install section'. npm install --save fundamental-vue npm install --save fiori-fundamentals npm install sass- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hi @nhebling ,
I did a very tiny sample app for fundamental-react : https://github.com/CodesOfRa/fundamental-react-demo
You can check this one until we fix the documentation.
Let me know if it helps.
It seems that mixing css and scss is not a good idea…
Renaming the file
src/App.css
tosrc/App.scss
in the project generated bycreate-react-app
did the trick for me.I’d suggest to update the documentation on https://www.npmjs.com/package/fundamental-react so that other rookies won’t stumble here: Replace “In your App.css or App.scss file” with “In your App.scss file”.
By the way, shouldn’t the sentence below the code sample read “browse the components currently available with Fundamental React” instead of “Fundamental Vue”?