TypeScript 环境搭建:
1、初始化package.json
npm init -y
2、初始化 tsc
tsc --init
产生 tsconfig.json 文件
3、ts运行环境
npm i webpack webpack-cli webpack-dev-sever -D
4、ts-loader 安装
npm i ts-loader typerscript -D
5、html-webpack-plugin 安装
npm i html-webpack-plugin -D
6、clean-webpack-plugin 安装
npm i clean-webpack-plugin -D
7、webpack-merge 安装
npm i webpack-merge -D
8、运行
npm start
9、打包
npm run build

10、typescript 语法提醒:
npm i typings -g 重启

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-25
  • 2021-11-22
  • 2021-12-03
  • 2021-07-14
  • 2021-07-21
相关资源
相似解决方案