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

defaultRouterOptions is not exported properly #65

Closed
ghost opened this issue Apr 3, 2016 · 4 comments
Closed

defaultRouterOptions is not exported properly #65

ghost opened this issue Apr 3, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 3, 2016

I've found this solution to fix the problem:
in default-router-options.js:
var defaultRouterOptions = module.exports = { "reverse":true}
instead of:
{ "reverse":true}

@TehShrike
Copy link
Owner

node/browserify will parse .json files as JSON if you require() them: https://nodejs.org/dist/latest-v4.x/docs/api/modules.html

The tests are currently passing: https://travis-ci.org/TehShrike/abstract-state-router

Are you using a different bundler? What's the symptom you ran into?

@AgentChris
Copy link

I have the same problem and I am using webpack

@ArtskydJ
Copy link
Collaborator

ArtskydJ commented Apr 4, 2016

Webpack is unable to load json files via require, if I remember right.

@TehShrike A possible workaround would be to make that .json file into a .js file...

@TehShrike
Copy link
Owner

Patch published as 5.12.2.

Would anyone be willing to open a pull request adding a new test file that attempts a build with Webpack to prevent any future issues with the Webpack build?

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

3 participants