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

Generic loading of moazik-ext-* stuff #60

Closed
benediktvaldez opened this issue Mar 14, 2016 · 11 comments
Closed

Generic loading of moazik-ext-* stuff #60

benediktvaldez opened this issue Mar 14, 2016 · 11 comments
Labels

Comments

@benediktvaldez
Copy link
Contributor

My situation is that node_modules is not located in the same folder as my code, but your built-in gulp build assumes otherwise (understandably I suppose)

Ideally we could find a way to load all modules that start with mozaik-ext- regardless of where node_modules is located

One example

Not sure how we could solve this - just throwing this out there for now 😸

@benediktvaldez
Copy link
Contributor Author

One way I guess would be to rewrite everything with webpack/css-modules, and have the components come with their styles and everything..

@plouc
Copy link
Owner

plouc commented Mar 14, 2016

Yep,I totally agree with the webpack switch, it could be better, but moving to webpack requires a lot of work, there's already an issue on this, it seems someone has started something :).

@plouc
Copy link
Owner

plouc commented Mar 14, 2016

A fix should be to try to find the node modules directory and use its path instead of the hardcoded one.

@benediktvaldez
Copy link
Contributor Author

One suggestion was to look for package.json, and go up a level if you don't find one, until you find one (with some limitations I guess) - but feels hacky - but this kind of stuff usually does 😄

@plouc
Copy link
Owner

plouc commented Mar 14, 2016

npm root does this, perhaps there's a solution in its source code

@plouc plouc added the build label Mar 14, 2016
@kurtextrem
Copy link
Contributor

kurtextrem commented Jun 13, 2016

What is the best way to start developing extensions? For example if I move my extension into the node_modules folder of my dashboard, it somehow doesn't listen to mixins.
More specific: I add the ApiConsumerMixin to my ext, but componentDidMount is never called on it (even though I can see it on my dashboard); none of the functions of the mixins is called anywhen.
Somehow those are called when using real node modules though.

@plouc
Copy link
Owner

plouc commented Jun 13, 2016

@kurtextrem, this problem often occurs when you have several modules duplicated, locally, I use npm link (with npm 3+) with latest mozaik version.

@kurtextrem
Copy link
Contributor

@plouc I have a funny other issue now:
info: Client #1 connected info: Setting timer for '....' info: removing interval for '....' info: Client #1 disconnected
And then more than one reconnect, even though only one window is open... which leads to Client #235 connected + disconnected after a few seconds.
Any ideas? I've tried reinstalling all node modules already.

@plouc
Copy link
Owner

plouc commented Dec 12, 2016

@kurtextrem, sorry for the late reply, can you share your package.json, config.js, app and server entry points ?

@plouc
Copy link
Owner

plouc commented Dec 12, 2016

@benediktvaldez, Mozaïk v2 now uses webpack, see installation instructions here.

@plouc
Copy link
Owner

plouc commented Dec 23, 2016

I close this issue as there's not much activity and the original issue should be solved with webpack.

@plouc plouc closed this as completed Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants