Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Joel Poloney
    @joelpoloney
    Ok sure
    Joel Poloney
    @joelpoloney
    is there anything significantly different than what is done under the covers right now? Zen creates a webpack config right now right?
    Victor Vlasenko
    @larixer
    Yes, I have switch to use hard-source-webpack-plugin in AUSK webpack.config.js instead of DLL
    Joel Poloney
    @joelpoloney
    Ah ok got it
    Joel Poloney
    @joelpoloney
    Question: Is this change a quick fix? or something that requires a bunch more work under the covers?
    Victor Vlasenko
    @larixer
    @joelpoloney I think it won’t require more work
    So you can regard it as a quick fix
    Joel Poloney
    @joelpoloney
    Ah ok great! Thank you for helping fix! Just let me know when it's ready and I can test it out for you
    Victor Vlasenko
    @larixer
    Yup, will do
    Victor Vlasenko
    @larixer
    @joelpoloney Switched to vanilla webpack and Metro configs for
    yarn create @larix generator, that has all the create-apollo-app templates and plus REST templates. I’m going to update create-apollo-app later, but it will be just a facade for running yarn create @larix inside
    Joel Poloney
    @joelpoloney
    Great! Is this only for new projects? What about for existing ones?
    Victor Vlasenko
    @larixer
    @joelpoloney Yep, for new projects. I guess you can use create-apollo-app to generate the project, then yarn create @larix and then diff them to see the changes
    And apply the diff to your current project
    Joel Poloney
    @joelpoloney
    Ah ok got it... let me try it out this afternoon and report back. Thank you for jumping on this!
    Joel Poloney
    @joelpoloney
    Running yarn start from inside the packages/web folder throws an error about a missing package wait-on. I did a yarn add wait-on and that fixed it
    Victor Vlasenko
    @larixer
    Thanks
    Victor Vlasenko
    @larixer
    @joelpoloney We have mixed user reports. Looks like some people want vanilla webpack configs, but some people really like @larix/zen. I think we might try to add an option to @larix/zen to actually output webpack configs to file system in such a way that they are ready for direct consumption of webpack.
    Joel Poloney
    @joelpoloney
    Yeah... @larix/zen is pretty great. I did the switch over last night (I'm in San Francisco time) and got it all working. It was pretty painless. There was some weirdness with NODE_ENV not being set that I had to tweak (open question: is there a way to set that with webpack-dev-server? I couldn't find it in their docs)
    That said, my recompiles are significantly faster now. But I'm not sure why. I haven't changed any of my code or any of your configs (unless you've already done that)
    Victor Vlasenko
    @larixer
    I’ve already done that by switching to hard-source-webpack-plugin
    Joel Poloney
    @joelpoloney
    Ah awesome!
    Victor Vlasenko
    @larixer
    For NODE_ENV setting
    Joel Poloney
    @joelpoloney
    Ah ok cool, I can try that. I figured it was something pretty simple
    Victor Vlasenko
    @larixer
    yep, it is, maybe I’ve just forgot something here and there, thanks for your report :)
    I have received one issue today:
    sysgears/larix#8
    that people want to use zen, so I’m unsure now
    I was under impression that vanilla webpack configs is a better approach
    Joel Poloney
    @joelpoloney
    I think it is as well (or at least exposing them so I can tweak them)
    Victor Vlasenko
    @larixer
    yep
    Joel Poloney
    @joelpoloney
    But yeah, I enjoyed using zen. I didn't really make use of all the configuration, but it just worked which was great
    Victor Vlasenko
    @larixer
    yeah, it worked until some point when it stopped, and you had to figure out how to unblock yourself
    Joel Poloney
    @joelpoloney
    Hm, so I have 'process.env.NODE_ENV': process.env.NODE_ENV, set in my build.config.js files
    What's weird is that process.env.NODE_ENV is undefined when running
    Victor Vlasenko
    @larixer
    @joelpoloney How about defining it this way:
      'process.env.NODE_ENV': process.env.NODE_ENV || 'development',
    Joel Poloney
    @joelpoloney
    Yeah, I could do that. It looks like for building, it actually does it in production since that's defined in the package.json file
    cross-env NODE_ENV=production webpack
    Victor Vlasenko
    @larixer
    yep!
    Joel Poloney
    @joelpoloney

    A couple quick questions...
    1) It seems like updating anything in the server folder recompiles but doesn't refresh the React app
    2) When I make changes to the server folder, I get some nice stats about recompiling but not in the web folder

    I believe both of these are due to the server using webpack --watch and web using webpack-dev-server. Been trying to figure out through their CLI options what to pass to enable these things but I'm coming up short. Any suggestions?

    Joel Poloney
    @joelpoloney
    Ah look like noInfo: true was the culprit for webpack-dev-server. Goofy name for what it actually does...
    Any ideas on having changes in server reload the React app in web? This is what zen did for me
    Victor Vlasenko
    @larixer
    Yep, this feature is missing with vanilla webpack configs, because it is complicated to implement
    Implementing it would require inter-process communication between server webpack process and webpack-dev-server process
    Joel Poloney
    @joelpoloney
    Ah got it. Bummer, it was a great feature that zen had
    Joel Poloney
    @joelpoloney
    Victor - I posted a question over in the create-apollo-app channel about debugging the GraphQL setup. I'm now on lerna (instead of zen) but still struggling to get the source maps read in... any ideas would be really helpful :smiley:
    Ian Holsman
    @kryton
    hey. i'm using the apollokit to start my app, and was wondering how do I run this in production or staging..
    zen start seems to only work in 'development', to the point i run it on non-localhost
    Victor Vlasenko
    @larixer
    @kryton You typically start in production the bundle compiled for production e.g. yarn build
    Ian Holsman
    @kryton
    @larixer oh.. and you then put the build files onto a regular webserver.. got it
    Victor Vlasenko
    @larixer
    yep