Would this plugin work with react-redux-starter-kit setup?
bytewiz opened this issue ยท 12 comments
I am currently using that structure, and given this error
browser.js:49 Warning: [react-router] Location "/carte-blanche" did not match any routes
user-bundle.js:19 Uncaught TypeError: Cannot set property '_ressources' of undefined
Failed to parse SourceMap: http://localhost:8080/carte-blanche/user-bundle.js.map
this is under the location localhost:8080/carte-blanche
and I followed the config at pointing it to my components which are under src/components
Link for the kit setup: https://github.com/davezuko/react-redux-starter-kit
Hope you can help as it is truly a GREAT lib you have here!!
You might need to adjust the filter
option a bit. By default, we match all uppercased folders with index
files and all uppercased files, both ending with either .js
/.jsx
/.es6
.
I think the bug here is that for the davezuko layout you need to remove the index
part from the Regex, since the index.js
file doesn't contain a component, but I'm not 100% sure.
@bytewiz did you ever end up gettin ga filter regex working? I'm running into same error
@SpencerCDixon no, didn't have the time yet, but if figure it out before me I would like to have the solution ๐
Running into the same issue with react router. Seems like there needs to be some kind of hook into the lib? Because the master routes.js
file doesn't contain a route ref to carte-blanche
(and even if it did, there's no component to point the route at) it throws. Not sure how to get around this.
Running into the same issue with react router.
Hmm, that shouldn't be an issue because Carte Blanche hooks into your server before anything even gets to the client side routing. What's your server setup like?
@SpencerCDixon did you have any luck ? otherwise I might have time to look into it this week :)
No luck. Don't really have time to figure it out though, just thought it would be cool if carte-blanche worked with just adding the webpack plugin. Maybe some debugging guidance in the docs would be useful! @bytewiz you should submit a PR to the readme if you figure it out :)
I've got similar error with
user-bundle.js:19 Uncaught TypeError: Cannot set property '_ressources' of undefined
19 line is window.$INITIALIZE_COMPONENT_GUI._ressources = resources;
I've installed v0.2.3
.
What else can I provide to help resolve this?
Edit: actually carte-blanche
was working, I just needed to adjust filter
to my components structure. Anyway this exception is being thrown on any page except /carte-blanche
because user-bundle.js
is injected on each page.
Is it expected?
@ewnd9 Can you share your filter?
@lightning18 of course
new CarteBlanche({
componentRoot: './src/components',
filter: /(.*)\/(\1)\.js$/
})
It matches files like component/component.js
Are you using this: https://github.com/davezuko/react-redux-starter-kit ? How did you solve the react-router issue?
Warning: [react-router] Location "/carte-blanche" did not match any routes
@lightning18 nope, I found that issue by searching user-bundle.js:19 Uncaught TypeError: Cannot set property '_ressources' of undefined
, sorry for the misunderstanding.