setting env with NODE_ENV
This commit is contained in:
parent
1a6179e931
commit
ebad436212
|
@ -1,4 +1,5 @@
|
|||
/out
|
||||
.next
|
||||
node_modules
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
yarn.lock
|
|
@ -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
|
||||
|
|
|
@ -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: '/' }
|
||||
|
|
Loading…
Reference in New Issue