mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Setup netlify-plugin-cache-folder
This commit is contained in:
parent
fb17befafd
commit
85254fe0f4
4 changed files with 10 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -92,3 +92,4 @@ dist
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/static/tailwind.css
|
/static/tailwind.css
|
||||||
|
|
||||||
|
/_cache
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,12 @@ import { isNetlify, rootDir } from '../environment.js'
|
||||||
|
|
||||||
|
|
||||||
// https://github.com/hanbyul-here/nuxt-incremental-build-exp/blob/cb3ef6b001b283de77efee64733db273d991129b/cache-me.js
|
// https://github.com/hanbyul-here/nuxt-incremental-build-exp/blob/cb3ef6b001b283de77efee64733db273d991129b/cache-me.js
|
||||||
export const CACHE_PATH = isNetlify
|
// export const CACHE_PATH = isNetlify
|
||||||
? path.join('/', 'opt', 'build', 'cache', 'app_build') // Netlify cache path
|
// ? path.join('/', 'opt', 'build', 'cache', 'app_build') // Netlify cache path
|
||||||
: path.join(rootDir, '.app_build_cache')//path.resolve(__dirname, '.app_build_cache')
|
// : path.join(rootDir, '.app_build_cache')//path.resolve(__dirname, '.app_build_cache')
|
||||||
|
|
||||||
|
|
||||||
|
export const CACHE_PATH = path.join(rootDir, '_cache')
|
||||||
|
|
||||||
|
|
||||||
export async function getNetlifyConfig () {
|
export async function getNetlifyConfig () {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ test('Can cache publish folder', async (t) => {
|
||||||
// we check if a cached file already exists
|
// we check if a cached file already exists
|
||||||
|
|
||||||
if ( await hasCachedPublishFolder() ) {
|
if ( await hasCachedPublishFolder() ) {
|
||||||
t.log('Publish folder has been cached already')
|
t.log(`Found cached publich folder at ${ CACHE_PATH }`)
|
||||||
t.pass()
|
t.pass()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
CI = "1"
|
CI = "1"
|
||||||
|
|
||||||
|
|
||||||
|
[[plugins]]
|
||||||
|
package = "netlify-plugin-cache-folder"
|
||||||
|
|
||||||
|
|
||||||
# Production context: all deploys from the Production branch set in your site’s
|
# Production context: all deploys from the Production branch set in your site’s
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue