Skip to content

fix missing .netlify/edge-functions/angular-ssr #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
const { rm } = require('fs/promises')
const { join } = require('path')

const ensureNoCompetingPlugin = require('./helpers/ensureNoCompetingPlugin')
const fixOutputDir = require('./helpers/fixOutputDir')
const getAngularJson = require('./helpers/getAngularJson')
Expand All @@ -11,13 +8,6 @@ const validateAngularVersion = require('./helpers/validateAngularVersion')
let isValidAngularProject = true

module.exports = {
async onDev({ constants }) {
// during local dev, the angular dev server will perform SSR,
// and we won't have the server output to generate the edge function.
// removing any edge function generated by a previous build ensures we don't try to use it.
const edgeFunctionDir = join(constants.INTERNAL_EDGE_FUNCTIONS_SRC, 'angular-ssr')
await rm(edgeFunctionDir, { recursive: true })
},
async onPreBuild({ netlifyConfig, utils, constants }) {
const { failBuild, failPlugin } = utils.build
const siteRoot = getAngularRoot({ failBuild, netlifyConfig })
Expand Down
Loading