Files
skeleton/scripts/pre-build.js
Adrian 9ca1addbbc Fix: Remove .gitignore from package build (#787)
* gitignore is removed from package build

* node script for moving generated files

* changed file name

* dropped console log
2023-01-11 08:48:32 +11:00

8 lines
438 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'));