npm - How to see the build version of a build project with npm
问题描述
I know that my question gonna be quite stupid for the pro vue.js and Webpack. I'm not really use to it yet.
I have actually a little application with vue.js and webpack. I was developing and seeing the result by using the command : npm run dev and looking at the local adress : http://localhost:8080/
Then, I have done a build version with : npm run build So eveything is fine but now, I dont know how to see the final result locally. What I have to do or what I'm missing ?
Thank for your answer
解决方案
你可以使用http-server
npm 包:
yarn global install http-server
# Or
npm install -g http-server
然后cd
进入您构建的文件夹并启动http-server
. 这应该给你一个网址。
推荐阅读
- center - MJML - 用图标居中一行文本
- android - Android 底部 Appbar Fab 过渡动画在更换菜单或使用 setSupportActionBar() 时消失
- r - 如何使函数中的某些参数接受多个数字并返回最小值
- dart - 如何在 Dart 中编码乌尔都语字符串?
- azure - 记住 Azure Active Directory Xamarin Forms 中上次登录的用户
- ios - 发布模式下的离子应用程序显示白屏
- bash - 如何测试 bats-assert 框架中是否设置了环境变量?
- azure - 将客户端应用程序添加到 Azure AD 应用程序会引发错误
- rust - 在 Rust 中,如何将发散函数作为参数传递给另一个函数
- node.js - 从 req.params.foo 查询参数到 mongoose find() 不起作用或返回空数组