Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with gatsby production build #338

Closed
xavdid opened this issue Jun 8, 2020 · 2 comments
Closed

Problem with gatsby production build #338

xavdid opened this issue Jun 8, 2020 · 2 comments

Comments

@xavdid
Copy link
Contributor

xavdid commented Jun 8, 2020

Hi there! I love bigfoot, so I'm really glad you decided to take this on.

I'm seeing some odd behavior when using this w/ Gatsby. During the development build, everything works as expected:

Screen Shot 2020-06-07 at 5 15 32 PM

During the production build, something goes wrong. It looks like the correct CSS isn't being applied and/or the regular markdown isn't being removed properly. You'll note that on the production page, the original footnotes are at the bottom of the page.

Screen Shot 2020-06-07 at 5 16 07 PM

You can see that live here: https://xavd.id/blog/post/an-ode-to-kobo/

I've got basically the exact example from the docs, plus the default numeric button markup:

https://github.com/xavdid/xavdid.github.io/blob/d3de8fc3ca9060335f1be8f6572f32246b335675/gatsby-browser.js

I tried it without the button markup it had the same result (except that the button was blank, not with a number).

I'm using gatsby-plugin-mdx (which uses remark under the hood) for markdown parsing and a recent (though not latest) version of gatsby (to get around a separate issue).

Any ideas you have are much appreciated!

@goblindegook
Copy link
Owner

goblindegook commented Jun 8, 2020

JS is working fine, but CSS is not being included. It seems to be an issue with Gatsby itself, there's at least an issue describing your exact problem: gatsbyjs/gatsby#5758 (closed due to inactivity).

If you copy the CSS file from the littlefoot module to your project and include it there, would that work around the issue?

@xavdid
Copy link
Contributor Author

xavdid commented Jun 8, 2020

Ah, great call! I changed import "littlefoot/dist/littlefoot.css"; to require("littlefoot/dist/littlefoot.css"); and it worked like a charm. So odd.

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants