Potential typo in Docs
Closed this issue ยท 3 comments
When I was trying to get Grommet working in my existing React app, I found that I needed to include the .scss
file suffix in import 'grommet/scss/vanilla/index';
.
My import statement reads import 'grommet/scss/vanilla/index.scss';
.
Not sure if that's a typo or if there's something in babel that doesn't require file name suffixes (our app is using webpack), but figured it might be worth mentioning. Screen shot of whereabouts in docs below:
Absolutely love Grommet. Thanks!
Thanks for bringing this up and for the kind words about Grommet ๐ .
Webpack has the extensions
entry in their config that allows you to remove the suffix for file paths: https://github.com/webpack/docs/wiki/Configuration#resolveextensions
I'm assuming you are missing this entry in your config:
resolve: {
extensions: ['', '.js', '.scss', '.css']
},
You can either add the extensions in all files, or use resolve.extensions entry, it is up to you.
@alansouzati ๐คฆ I'm very new to webpack - thanks for the help and apologies for creating an issue for that.
No need to apologize. It is good that search indexes will get this page available for folks that will eventually face a similar issue. ๐