Skip to content

Commit a2fbfa9

Browse files
committed
Adjust functions publish target
1 parent c9a3217 commit a2fbfa9

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/index.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,9 @@ const loginPage = '/_netlify-sso'
2828
const authFunc = 'sso-auth'
2929

3030
/**
31-
* @param {{ config: NetlifyConfig, functionsDir?: string, publishDir?: string }} params
31+
* @param {{ config: NetlifyConfig, functionsDir: string, publishDir: string }} params
3232
*/
33-
async function generateSSO({
34-
config /* &mut */,
35-
functionsDir = '_netlify_sso_functions',
36-
publishDir = '_netlify_sso_publish',
37-
}) {
38-
config.build = {
39-
...config.build,
40-
functions: functionsDir,
41-
publish: publishDir,
42-
}
43-
33+
async function generateSSO({ config /* &mut */, functionsDir, publishDir }) {
4434
await fs.mkdir(functionsDir, { recursive: true })
4535
await fs.mkdir(publishDir, { recursive: true })
4636

@@ -106,11 +96,11 @@ module.exports = {
10696
// Whole configuration file. For example, content of `netlify.toml`
10797
netlifyConfig,
10898
// Build constants
109-
constants: { PUBLISH_DIR, FUNCTIONS_SRC },
99+
constants: { PUBLISH_DIR, FUNCTIONS_DIST },
110100
}) {
111101
await generateSSO({
112102
config: netlifyConfig,
113-
functionsDir: FUNCTIONS_SRC,
103+
functionsDir: FUNCTIONS_DIST,
114104
publishDir: PUBLISH_DIR,
115105
})
116106

0 commit comments

Comments
 (0)