-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pr feedback; fix cache-control headers
- Loading branch information
Showing
6 changed files
with
29 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import { Token } from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | ||
import * as spawn from 'cross-spawn'; | ||
import * as fs from 'fs-extra'; | ||
import * as glob from 'glob'; | ||
import { listDirectory } from './NextjsAssetsDeployment'; | ||
import { CompressionLevel, NextjsBaseProps } from './NextjsBase'; | ||
|
||
|
@@ -126,24 +125,6 @@ export class NextjsBuild extends Construct { | |
if (buildResult.status !== 0) { | ||
throw new Error('The app "build" script failed.'); | ||
} | ||
|
||
// cleanup | ||
// delete the `sharp` module since it's provided by the lambda layer | ||
const sharpPathNpm = path.join(this._getNextStandaloneDir(), 'node_modules', 'sharp'); // npm/yarn | ||
if (fs.existsSync(sharpPathNpm)) { | ||
// delete the sharp folder | ||
if (!this.props.quiet) console.debug('├ Deleting sharp module from', sharpPathNpm); | ||
fs.removeSync(sharpPathNpm); | ||
} | ||
// is there a `[email protected]` folder in the `node_modules/.pnpm` folder? | ||
const pnpmModulesDir = path.join(this._getNextStandaloneDir(), 'node_modules', '.pnpm'); // pnpm | ||
// get glob pattern for sharp version | ||
const matches = glob.sync(path.join(pnpmModulesDir, 'sharp@*')); | ||
if (matches.length > 0) { | ||
// delete the sharp folder | ||
if (!this.props.quiet) console.debug('├ Deleting sharp module from', matches[0]); | ||
fs.removeSync(matches[0]); | ||
} | ||
} | ||
|
||
// getNextBuildId() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters