Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Webpack 2 branch isn't working right now #46

Closed
evelant opened this issue Sep 22, 2016 · 5 comments
Closed

Webpack 2 branch isn't working right now #46

evelant opened this issue Sep 22, 2016 · 5 comments

Comments

@evelant
Copy link

evelant commented Sep 22, 2016

There seem to be a few issues:

new webpack.LoaderOptionsPlugin({
    options: {
        postcss: [cssModulesValues]
    }
}),
  • css-loader version needs to be bumped to 0.25.0

After these changes it seems to run OK, but I am very new to webpack so there may still be other issues.

@jedwards1211
Copy link
Member

Thanks for letting me know! Do you want to make a PR?

@evelant
Copy link
Author

evelant commented Sep 26, 2016

It seems there are some issues with meteor-imports-webpack-plugin that are preventing webpack2 from working as well. jedwards1211/meteor-imports-webpack-plugin#13

I am still teaching myself webpack so these issues are difficult for me to solve at the moment. I am not sure when I will have time to dive in far enough to get a workable PR.

@darkadept
Copy link
Contributor

As an alternative you can use Redux middleware to handle a lot of the Meteor reactivity. I adapted code from here https://github.com/djhi/my-nutrition/tree/master/app/client/middlewares for my own project.

If those middleware's are active you just fire a redux action like this:

function myAction(param1) {
  return {
    type: 'MY_ACTION',
    meteor: {
      subscribe: () => Meteor.subscribe('mysubscription', param1),
      get: () => MyCollection.find(),
    }
  }
}

The caveat here is that data is usually stored twice on the client side. Once in minimongo via Meteor, and then again when the reducer stores it in state. Not a big deal to me. Just ignore that minimongo exists. ;-)

@jedwards1211
Copy link
Member

It's funny how many ways there are to solve a problem. I have <MeteorSub> components that subscribe on mount or prop changes and unsubscribe on unmount so that I can declare what subscriptions I need for a given container. Really convenient for reactive joins on the client. Also, I created some redux integration for Mongo.Cursor.observeChanges that merges the document changes into my Immutable.js redux state. But it does get tricky to guarantee performance that way with thousands of documents.

jedwards1211 added a commit that referenced this issue Oct 4, 2016
@jedwards1211
Copy link
Member

Okay, this is fixed now

jedwards1211 added a commit that referenced this issue Apr 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants