import os os.system('npm run build') for file in os.listdir('dist'): if file.endswith('.vcd'): os.remove('dist/' + file) with open('./dist/index.html', 'r', encoding='utf-8') as fp: html = fp.read() html = html.replace("''", "''") with open('./dist/index.html', 'w', encoding='utf-8') as fp: fp.write(html)