-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Set NODE_ENV=production on node process when running "gatsby build" #337
Comments
TBH, I haven't tried loading fonts with Gatsby. Someone else contributed the font webpack config here gatsby/lib/utils/webpack.config.js Lines 255 to 258 in aeccf94
It is setup to run the same though in both develop and production. |
It worked fine once I built it with I like it when things Just Work™! :) |
Mmmm... I've heard people say this before and it just occurred to me why. We autoset |
Fixes #337 There seems to be a few Webpack loaders that require this e.g. sass-loader. We set NODE_ENV to production already *inside* Webpack e.g. for React's optimizations but this PR is necessary for code *outside* Webpack e.g. node code in Webpack loaders.
Fixes #337 There seems to be a few Webpack loaders that require this e.g. sass-loader. We set NODE_ENV to production already *inside* Webpack e.g. for React's optimizations but this PR is necessary for code *outside* Webpack e.g. node code in Webpack loaders.
@emilyaviva this is going out in a new release in a sec. Would be very appreciative if you could upgrade and see if the issue is in fact resolved. |
I think this does it! Thanks Kyle, you have been rockin' today 🚀 |
:D thanks!
|
fixz0r3d! |
💯
|
I am finishing a Gatsby-ified version of my personal website (http://emilyaviva.github.io/eakm-website-gatsby) and a sticking point seems to be that when the source (http://github.com/emilyaviva/eakm-website-gatsby) is run normally in develop mode, the font-awesome fonts get included, but when it is actually built, the font-awesome fonts don't make it in, somehow. My guess is this has to do with the Webpack loader config, but I'm not sure how. Any ideas?
The text was updated successfully, but these errors were encountered: