parcel打包工具,可以直接在HTML中引入ts
在HTML中直接用script标签引入ts是无法识别的,例如<script src="./abc.ts"></script>,需要用parcel打包
parcel地址:https://github.com/parcel-bundler/parcel
安装parcel:npm install parcel@next
打包命令:`parcel ./src/index.html`
该命令会在本地启动一个服务器:localhost:1234
访问服务器就可以得到打包后index.html的内容
浙公网安备 33010602011771号