17 lines
378 B
TypeScript
17 lines
378 B
TypeScript
import fs from 'fs-extra'
|
|
import { zip } from 'zip-a-folder'
|
|
import path from 'path'
|
|
|
|
async function main() {
|
|
const content = fs.readFileSync(path.join('dist', 'index.html')).toString()
|
|
|
|
fs.writeFileSync(
|
|
path.join('dist', 'index.html'),
|
|
content.replace(`type="module" crossorigin`, 'defer')
|
|
)
|
|
|
|
await zip('dist', path.join('html.zip'))
|
|
}
|
|
|
|
main()
|