- AutoDll - used in dev for react and react-dom
- ChunkNames - used to patch Webpack 4 to behave like Webpack 3
- ReactLoadable - code-splitting
- WebpackBar - sick UX for build progress
- FriendlyErrors - makes some Webpack error messages less cryptic
- NextJsRequireCacheHotReloader - deletes entries from require.cache on server
- HotModuleReplacement - client hot-reloading
- NoEmitOnErrors - skips emitting errors during the compile phase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bundlesize": [ | |
{ | |
"path": "./build/public/vi-assets/static-assets/story-*.js", | |
"maxSize": "310 Kb" | |
}, | |
{ | |
"path": "./build/public/vi-assets/static-assets/vendor-*.js", | |
"maxSize": "240 Kb" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"develop": "rimraf public && gatsby develop", | |
"auth": "gcloud auth login", | |
"project": "gcloud config set project $GCP_PROJECT", | |
"build": "rimraf public && gatsby build", | |
"upload": "gsutil -m rsync -r ./public $UPLOAD_URL", | |
"tasks": "yarn project && yarn build && yarn upload", | |
"dev": "env-cmd dev yarn develop", | |
"dev-static": "env-cmd dev-static yarn build", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dev": { | |
"OPEN_WEATHER_MAP_API_KEY": "1254323hrgnr3y2h4thy42y5y24", | |
"SITE_URL": "http://localhost:8000" | |
}, | |
"dev-static": { | |
"OPEN_WEATHER_MAP_API_KEY": "1254323hrgnr3y2h4thy42y5y24", | |
"SITE_URL": "http://localhost:9000" | |
}, | |
"production": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"develop": "rimraf public && gatsby develop", | |
"build": "rimraf public && gatsby build", | |
"dev": "env-cmd dev yarn develop", | |
"dev-static": "env-cmd dev-static yarn build", | |
"production": "env-cmd production yarn build" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dev": { | |
"OPEN_WEATHER_MAP_API_KEY": "1254323hrgnr3y2h4thy42y5y24", | |
"SITE_URL": "http://localhost:8000" | |
}, | |
"dev-static": { | |
"OPEN_WEATHER_MAP_API_KEY": "1254323hrgnr3y2h4thy42y5y24", | |
"SITE_URL": "http://localhost:9000" | |
}, | |
"production": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
siteMetadata: { | |
title: 'Hello World', | |
description: 'This is my hello world site', | |
siteUrl: process.env.SITE_URL, | |
openWeatherMapApiKey: process.env.OPEN_WEATHER_MAP_API_KEY, | |
}, | |
plugins: ['gatsby-plugin-emotion', 'gatsby-plugin-react-helmet'], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
siteMetadata: { | |
title: 'Hello World', | |
description: 'This is my hello world site', | |
openWeatherMapApiKey: process.env.OPEN_WEATHER_MAP_API_KEY, | |
}, | |
plugins: ['gatsby-plugin-emotion', 'gatsby-plugin-react-helmet'], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Weather from 'components/Weather'; | |
export default function HelloPage({ data }) { | |
const { site: { siteMetadata } } = data; | |
return ( | |
<article> | |
<h1>{siteMetadata.title}</h1> | |
<p>{siteMetadata.description}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
siteMetadata: { | |
title: 'Hello World', | |
description: 'This is my hello world site', | |
openWeatherMapApiKey: 'a1b2c3d4e5f6!^$!^!^$', | |
}, | |
plugins: ['gatsby-plugin-emotion', 'gatsby-plugin-react-helmet'], | |
}; |
NewerOlder