-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Next.js] Fixes for
nextjs-xmcloud
Initializer Template (#1657)
* Fix issue where nextjs-xmcloud template's /src/lib/next-config/plugins/monorepo.js wasn't being cleaned up properly. Use dedicated monorepo-xmcloud.js instead. * Fix issue with init-runner where response.initializers would prevent any following initializers to be skipped (return statement caused early exit) * updated CHANGELOG (cherry picked from commit b691251)
- Loading branch information
Showing
6 changed files
with
24 additions
and
8 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
10 changes: 10 additions & 0 deletions
10
packages/create-sitecore-jss/src/initializers/nextjs-xmcloud/remove-dev-dependencies.ts
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
|
||
export const removeDevDependencies = (projectPath: string) => { | ||
// remove monorepo next.config.js plugin | ||
const monorepoPlugin = path.join(projectPath, 'src/lib/next-config/plugins/monorepo-xmcloud.js'); | ||
if (fs.existsSync(monorepoPlugin)) { | ||
fs.unlinkSync(monorepoPlugin); | ||
} | ||
}; |
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