Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 5fb2b51

Browse files
committed
Allow overring settings in dev vs build
1 parent 93d6333 commit 5fb2b51

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/commands/dev/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ class DevCommand extends Command {
122122
const {flags, args} = this.parse(DevCommand)
123123
const {api, site, config} = this.netlify
124124
const functionsDir =
125-
flags.functions || (config.build && config.build.functions)
125+
flags.functions ||
126+
(config.dev && config.dev.functions) ||
127+
(config.build && config.build.functions)
126128
const addonUrls = {}
127129
if (site.id && !flags.offline) {
128130
const accessToken = await this.authenticate()
@@ -152,11 +154,14 @@ class DevCommand extends Command {
152154
let settings = serverSettings(config.dev)
153155
if (!(settings && settings.cmd)) {
154156
this.log('No dev server detected, using simple static server')
157+
const dist =
158+
(config.dev && config.dev.publish) ||
159+
(config.build && config.build.publish)
155160
settings = {
156161
noCmd: true,
157162
port: 8888,
158163
proxyPort: 3999,
159-
dist: config.build && config.build.publish,
164+
dist,
160165
}
161166
}
162167
startDevServer(settings, this.log, this.error)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy