@patternfly/react-icons
Version:
PatternFly 4 Icons as React Components
13 lines (9 loc) • 509 B
JavaScript
import { writeFileSync, mkdirSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const esmPackageJsonPath = join(__dirname, '../dist/esm/package.json');
// Ensure dist/esm directory exists
mkdirSync(dirname(esmPackageJsonPath), { recursive: true });
// Write package.json to mark ESM directory as a module
writeFileSync(esmPackageJsonPath, JSON.stringify({ type: 'module', sideEffects: false }, null, 2));