setting env with NODE_ENV

This commit is contained in:
James Gareth Smith 2018-07-09 09:59:57 +02:00
parent 1a6179e931
commit ebad436212
3 changed files with 8 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/out
.next
node_modules
.DS_Store
.DS_Store
yarn.lock

View File

@ -9,4 +9,4 @@ ETHPrize single page React website
`npm run deploy` to deploy to `https://nona-creative.github.io/ETHPrize`
`yarn lint` runs the eslinter
`npm lint` runs the eslinter

View File

@ -1,7 +1,10 @@
const withSass = require('@zeit/next-sass')
const withSass = require('@zeit/next-sass');
const dev = process && process.env && process.env.NODE_ENV === 'development';
module.exports =
withSass({
assetPrefix: isProduction ? '/ETHPrize' : '',
assetPrefix: dev ? '' : '/ETHPrize',
exportPathMap: function(defaultPathMap) {
return {
'/': { page: '/' }