ardatan / meteor-webpack

https://medium.com/@ardatan/meteor-with-webpack-in-2018-faster-compilation-better-source-handling-benefit-from-bc5ccc5735ef
MIT License
123 stars 29 forks source link

production ready? #7

Closed mcarlstein closed 6 years ago

mcarlstein commented 6 years ago

Hello!

Thanks for creating this! The reload time with meteor is really annoying! specially for the frontend.

Just tried to migrate a medium sized meteor and react project. And it worked pretty good! (If I find som issue I will submit them. )

I was thinking if this is production ready? Can I make a production build?

I use galaxy for my deploy.

ardatan commented 6 years ago

Thank you for your good comment and collaboration. There are some known issues in development mode, but I didn't experience any problems in production mode. So you can try to use it with galaxy. If you experience any problems, please open an issue. I will help as soon as possible I can.

mcarlstein commented 6 years ago

Ok. So I just make a production version off my webpack.config.js and it should be enough?

ardatan commented 6 years ago

You don’t need any extra config for production.

mcarlstein commented 6 years ago

But when I run meteor deploy with --settings and with the same webpack.config.js (same as the react example). The react version is running in debug mode.

Sorry, I dont know webpack so well. :)

ardatan commented 6 years ago

You're doing right :)

mcarlstein commented 6 years ago

I had to set

new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') })

In the plugins array in config.js :)

and when deploy production to galaxy I hade to set NODE_ENV=production before the meteor deploy script!

Thanks! :)

I will keep trying more when there is time. Really love the idea with hotreload and webpack for Meteor!

ardatan commented 6 years ago

I am closing this issue. If you experience any issues in production, you can open a new issue about the case.

Thanks!