File size: 378 Bytes
ea35075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()