setting env with NODE_ENV
This commit is contained in:
parent
1a6179e931
commit
ebad436212
|
@ -1,4 +1,5 @@
|
||||||
/out
|
/out
|
||||||
.next
|
.next
|
||||||
node_modules
|
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`
|
`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 =
|
module.exports =
|
||||||
withSass({
|
withSass({
|
||||||
assetPrefix: isProduction ? '/ETHPrize' : '',
|
assetPrefix: dev ? '' : '/ETHPrize',
|
||||||
exportPathMap: function(defaultPathMap) {
|
exportPathMap: function(defaultPathMap) {
|
||||||
return {
|
return {
|
||||||
'/': { page: '/' }
|
'/': { page: '/' }
|
||||||
|
|
Loading…
Reference in New Issue