Skip to content

Commit

Permalink
fix: also run blobs on ntl serve
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Nov 17, 2023
1 parent 7ab484b commit 041a2c6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/commands/serve/serve.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import process from 'process'

import { Option } from 'commander'
Expand All @@ -24,6 +23,7 @@ import openBrowser from '../../utils/open-browser.mjs'
import { generateInspectSettings, startProxyServer } from '../../utils/proxy-server.mjs'
import { runBuildTimeline } from '../../utils/run-build.mjs'
import { getGeoCountryArgParser } from '../../utils/validation.mjs'
import { getBlobsContext } from '../../lib/blobs/blobs.mjs'

/**
* The serve command
Expand Down Expand Up @@ -71,7 +71,7 @@ const serve = async (options, command) => {
// Netlify Build are loaded.
await getInternalFunctionsDir({ base: site.root, ensureExists: true })

let settings = /** @type {import('../../utils/types.js').ServerSettings} */ ({})
let settings = /** @type {import('../../utils/types.js').ServerSettings} */ {}
try {
settings = await detectServerSettings(devConfig, options, command)

Expand All @@ -95,8 +95,15 @@ const serve = async (options, command) => {
options,
})

const blobsContext = await getBlobsContext({
debug: options.debug,
projectRoot: command.workingDir,
siteID: site.id ?? 'unknown-site-id',
})

const functionsRegistry = await startFunctionsServer({
api,
blobsContext,
command,
config,
debug: options.debug,
Expand Down

0 comments on commit 041a2c6

Please sign in to comment.