-
Notifications
You must be signed in to change notification settings - Fork 248
Build fails when importing Bootstrap CSS #1190
Comments
@jhyland87 This is a node error. When requiring/importing a local file with node, you must use a relative path. So you need to do |
@MoOx, thanks for the quick reply. I tried that and got another error
(Full error here) This looks like it may be a webpack error, but all I'm attempting to do is basically copy the Phenomic Aphrodite example and add Bootstrap. Merely including the bootstrap CSS is what throws it all outa whack. Do you have any working phenomic examples using a similar setup? If you want to see the exact code, here ya go. |
The CSS you are importing is probably importing some resources, maybe using url(). So webpack tries to handle those resources. We plan to extends the default webpack config to be more like CRA (so copy generic stuff). Meanwhile, you should bring your own webpack config starting with this one as a base: https://github.com/phenomic/phenomic/blob/master/packages/plugin-bundler-webpack/src/webpack.config.js |
Bootstrap should work by default as lots of people might want to do the same. Will probably grab webpack config from CRA as the default. |
Looks like you're right about the
I'll take your approach. Thanks for your time! |
Im having an issue when I try to import the Bootstrap CSS files.
Heres the App.js file, its pretty basic:
And heres the build error:
(Full output here)
The specific error is:
But I verified that the bootstrap.css file does in fact reside at the location specified in the error.
After some troubleshooting, I noticed that it will import a CSS file assets/plugins/bootstrap/css/styles.css just fine, but when I rename it to assets/plugins/bootstrap/css/bootstrap.css, it throws the error above.
I tried to look around a bit, and the only issue I found thats somewhat similar to mine would be Issue #649. But that actually doesn't seem to be the same issue.
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: