mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add isNetlify env helper
This commit is contained in:
parent
1e782c1f18
commit
232b3ae1c3
2 changed files with 4 additions and 2 deletions
|
|
@ -4,4 +4,6 @@ import path from 'path'
|
|||
|
||||
export const isProduction = process.env.NODE_ENV === 'PRODUCTION'
|
||||
|
||||
export const isNetlify = process.env.NETLIFY === true
|
||||
|
||||
export const rootDir = path.resolve(__dirname, '../')
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import { default as TOML } from '@iarna/toml'
|
|||
// https://github.com/jprichardson/node-fs-extra
|
||||
import fs from 'fs-extra'
|
||||
|
||||
import { isProduction, rootDir } from '../environment.js'
|
||||
import { isNetlify, rootDir } from '../environment.js'
|
||||
|
||||
|
||||
|
||||
// https://github.com/hanbyul-here/nuxt-incremental-build-exp/blob/cb3ef6b001b283de77efee64733db273d991129b/cache-me.js
|
||||
export const CACHE_PATH = isProduction
|
||||
export const CACHE_PATH = isNetlify
|
||||
? path.join('/', 'opt', 'build', 'cache', 'app_build') // Netlify cache path
|
||||
: path.join(rootDir, '.app_build_cache')//path.resolve(__dirname, '.app_build_cache')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue