vue3入门npm安装法简单笔记
简书链接:vue3入门npm安装法简单笔记
文章字数:496,阅读全文大约需要1分钟
这里采用npm法
1 | npm install cnpm -g |
实际代码架构
index.html
1 | <!DOCTYPE html> |
vscode运行和调试
选中main.ts
点击运行
选择node.js
将自动运行
修改代码后,发现会自动变化。
或者在不选择任何文件的情况下,选择run node.js,然后会提示run dev .,
务必先进行npm instlal
参考https://www.runoob.com/vue3/vue3-create-project.html
固定端口
vite.config.ts中
1 | /// <reference types="vitest" /> |
“scripts”: {
“serve”: “vite preview –port 6000”
},
端口参考
https://blog.csdn.net/Jeasu_0908/article/details/122583100
https://blog.51cto.com/u_15155073/2691729
https://blog.csdn.net/zhangxueyou2223/article/details/131450798
https://www.51c51.com/danpianji/xinxi/84/554215.html
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 情迁博客!
评论