Inconsistency across documentation
See original GitHub issueHi. I installed “react-bulma-components”: “^2.3.0”.
I’ve been trying to get this working for a couple of days with no luck.
According to npm documentation (https://www.npmjs.com/package/react-bulma-components), I should crate an alias to _variables.sass. As I don’t use webpack, I managed to do that with a plugin:
npm i --save-dev link-module-alias
And then in package.json
"_moduleAliases": {
"_variables.sass": "src/scss/_variables.sass"
},
Anyway it fails, because inside _variables I have a call to:
@import '~bulma/sass/utilities/initial-variables.sass'
And that cannot be resolved: “File to import not found or unreadable: ~bulma/sass/utilities/initial-variables.sass.”,
Where does ~ come from? Is it another alias?
Now, there’s this other tutorial (not official: https://hackernoon.com/building-a-website-with-react-and-bulma-d655214bff2a) that has a couple of nice details regarding chokidar executing. And it imports the scss like this, without ~:
@import "bulma/sass/utilities/initial-variables";
That almost works. However, I get this error:
File to import not found or unreadable: ~_variables.sass.
Like I’m forced to declare that file in a given path (maybe related to ~). But who is throwing that error? Well, seems like this guy does:
import Columns, {Column} from 'react-bulma-components/lib/components/columns';
But wait, there`s nothing in npm documentation telling that I should declare my sass file in my root folder or something. However… there is something mentioned in v3… on github:
https://github.com/couds/react-bulma-components#advanced
There you can read: “Now the alias needed to override Bulma variables (and/or use the directly the sass files) is _variables.sass instead of ~_variables.sass”
But wait, the old npm documentation never mentioned the ~ in the alias. It just says:
alias: {
'_variables.sass': path.resolve(__dirname, 'relative/path/from/webpack/config/to/your/_variables.sass'),
},
Anyway, making it “~_variables.sass” wont work either. Same error (at least not using webpack but the plugin I mentioned, as I use just CRA).
So… I’m kinda lost. Hope that with v3 released the docs will be cleared. However… I must say I’ve been reading that docs and I totally disagree with the NODE_PATH=./src
workaround. Does that means that I must place my sass file there instead of in a proper styles folder?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)
@MrCreeper1008 Yes, you can find it on the link https://github.com/couds/react-bulma-components/tree/feature/public-page/public (will be on the public folder of this repo, but currently its on the public-page branch
I finally release v3 as the latest version the inconsistency on the docs should be solved. Open this again if you find something else.
Thanks