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

Router override is not bundled by webpack #5

Closed
xavivars opened this issue Jul 5, 2019 · 9 comments · Fixed by #16
Closed

Router override is not bundled by webpack #5

xavivars opened this issue Jul 5, 2019 · 9 comments · Fixed by #16

Comments

@xavivars
Copy link

xavivars commented Jul 5, 2019

For some reason, when using the plugin, the override of @reach/router is not getting bundled by webpack.

This repo gatsby starter + plugin
https://github.com/xavivars/gatsbybug

and it's deployed here and doesn't work:
http://gatsby-bug.s3-website-eu-west-1.amazonaws.com/notworking/page-2/

(you will see a redirect happening)

I can't understand why it works in here

http://gatsby-bug.s3-website-eu-west-1.amazonaws.com/gatsby/page-3/

(source code for this is coming from https://github.com/wardpeet/gatsby-demos/tree/static-asset-prefix )

@xavivars
Copy link
Author

xavivars commented Jul 5, 2019

It seems it has to do with webpack prefering es version of @reach/router instead of the commonjs version, so then the webpack override (the one that looks for @reach/router usages) never gets applied.

I'm not sure if this has something to do with gatsbyjs/gatsby#15270

@xavivars
Copy link
Author

xavivars commented Jul 5, 2019

@xavivars
Copy link
Author

xavivars commented Jul 8, 2019

Closing, as I can't reproduce it anymore...

If the issue re-appears, I'll re-open it.

@xavivars xavivars closed this as completed Jul 8, 2019
@xavivars xavivars reopened this Aug 20, 2019
@xavivars
Copy link
Author

xavivars added a commit to xavivars/gatsby-plugin-static-site that referenced this issue Aug 20, 2019
@xavivars
Copy link
Author

@wardpeet, any chance to look into this?

@wardpeet
Copy link
Owner

Hey sorry, i'll try to get to it somewhere this week, it has been a few busy weeks and I went on vacation.

@apaniel
Copy link
Contributor

apaniel commented Sep 6, 2019

update on why the page goes blank:
#10 (comment)

@wardpeet
Copy link
Owner

Sorry for my absence, I haven't read through the issue yet but I'll make sure that it works again this week, I hope to get a new release out tomorrow or the day after.

@xavivars
Copy link
Author

Temporarily, while #9 and #11 get merged I've published a fork of this plug-in with both PRs merged as https://www.npmjs.com/package/@xavivars/gatsby-plugin-static-site

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