Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/devops/publish/cleanse-pkg.js
2023-05-26 16:31:53 +02:00

13 lines
446 B
JavaScript

import { readFileSync, writeFileSync } from 'fs';
const packageFile = './package.json';
const packageJson = JSON.parse(readFileSync(packageFile, 'utf8'));
/**
* Here we will modify the package.json to remove dependencies that are not needed in the CMS or does not work on npm.
*/
delete packageJson.dependencies['router-slot'];
// Write the package.json back to disk
writeFileSync(packageFile, JSON.stringify(packageJson, null, 2), 'utf8');