File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable import/no-extraneous-dependencies */
2
2
import { existsSync } from 'node:fs'
3
- import { resolve } from 'node:path'
3
+ import { resolve , join } from 'node:path'
4
4
import { cpus } from 'os'
5
5
6
6
import { NetlifyPluginConstants } from '@netlify/build'
@@ -52,14 +52,14 @@ export const storePrerenderedContent = async ({ NETLIFY_API_TOKEN, SITE_ID }:
52
52
const blob = netliBlob ( NETLIFY_API_TOKEN , deployID , SITE_ID )
53
53
// todo: Check out setFiles within Blobs.js to see how to upload files to blob storage
54
54
const limit = pLimit ( Math . max ( 2 , cpus ( ) . length ) )
55
+ console . log (
56
+ outdent `
57
+ Uploading Files to Blob Storage...
58
+ ` )
55
59
56
60
const uploadFilesToBlob = async ( key : string , file : string ) => {
57
61
try {
58
- console . log (
59
- outdent `
60
- Uploading Files to Blob Storage...
61
- ` )
62
- const content = await readFile ( file , 'utf8' )
62
+ const content = await readFile ( join ( BUILD_DIR , file ) , 'utf8' )
63
63
await blob . set ( getNormalizedBlobKey ( key ) , content )
64
64
} catch ( error ) {
65
65
console . error ( error )
You can’t perform that action at this time.
0 commit comments