Files
skeleton/scripts/pre-build.js
2022-12-02 07:21:21 +11:00

8 lines
436 B
JavaScript

#!/usr/bin/env node
import { del } from "edit-package-json";
import { readFileSync, writeFileSync } from 'fs'
//We chop out the exports field of ../package.json rather than manipulate the one in ../package/package.json in case there
//are changes to the behaviour of 'vite build'. post-build.js will patch it back in so that monorepos work again.
writeFileSync('package.json', del(readFileSync('package.json').toString(), 'exports'))