去掉"You are running Vue in development mode"提示
vue项目中报错:
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
尝试许多方法均无果,后尝试不使用 dll 加速构建,不会有此提示
最终发现是因为使用 DllPlugin 和 DllReferencePlugin 加速构建时,生成的 vue 未指明 env.NODE_ENV
在 webpack.dll.conf.js 里指定 production 后问题解决
修改 plugins 配置
/** ... */
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, '.', '[name]-manifest.json'),
name: '[name]_library',
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
// 去掉 vue 的 development 提示
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
]
/** ... */
去掉"You are running Vue in development mode"提示的更多相关文章
- 去掉 vue 的 "You are running Vue in development mode" 提示
去掉 vue 的 "You are running Vue in development mode" 提示 在项目的 main.js 中已经配置了 Vue.config.produ ...
- 使用taro开发钉钉的E应用报错 You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://git
今天测试taro转钉钉E应用的时候,在模拟器上没事,但是在真机上却报错了: You are currently using minified code outside of NODE_ENV === ...
- vue中npm run dev运行项目不能自动打开浏览器! 以及 webstorm跑vue项目jshint一直提示错误问题的解决方法!
vue中npm run dev运行项目不能自动打开浏览器!以及 webstorm跑vue项目jshint一直提示错误问题的解决方法! 1.上个项目结束就很久没有使用vue了,最近打算用vue搭建自己的 ...
- VUE 密码验证与提示
1. 概述 1.1 说明 vue项目中,为了较为明了的让用户看到所输入的密码信息的长度与复杂度是否满足要求,开发一个组件来满足此需求(当密码输入时进行密码验证操作,当密码的长度在8到24位之间,密码中 ...
- vue -resource 文件提交提示process,或者拦截处理
this.$http.post('url',fd||data,{emulateJSON:true}).then(fn(res){},fn(res){}) process成功案例 _self.$http ...
- vscode vue 格式化 和emmet 提示
ctrl+shift+p打开用户默认设置 设置vetur插件 "vetur.validation.template": false, "vetur.format.defa ...
- vue-cli 3.x版本执行vue ui命令后提示Error: Cannot find module ‘core-js/modules/es7.object.entries’报错的解决方法
我的方法是:npm install --save core-js(全局安装竟然不行,必须局部) vue-cli新版提供了界面化项目管理的功能,简直一万个赞! 在安装 vue-cli 3.x 版本后, ...
- 去掉idea的mybatis烦人的xml提示
可以在setting中自己找,也可以在顶部输入 No data sources configure , SQL dialect detection , Injected language fra ...
- 阿里OSS Vue上传文件提示The OSS Access Key Id you provided does not exist in our records.解决方法
vue项目 1.安装OSS的Node SDK npm install ali-oss --save 2.参考官方提示https://help.aliyun.com/document_detail/11 ...
随机推荐
- nodejs + express + express-session + redis
nodejs + express + express-session + redis 标题似乎又是不太对,大家领会精神哈 Express 安装express-generator,然后用它来创建一个工程 ...
- git commit命令
git commit 主要是将暂存区里的改动提交到本地的版本库.每次使用git commit 命令我们都会在本地版本库生成一个40位的哈希值,这个哈希值也叫commit-id. commit-id在版 ...
- Working with Excel Files in Python
Working with Excel Files in Python from: http://www.python-excel.org/ This site contains pointers to ...
- nginx日志 logrotate配置
nginx 日志 logrotate配置如下: /var/log/nginx/*.log { daily missingok rotate 20 compress delaycompress noti ...
- mybatis查询如何返回List<Map>类型数据
只要设定resultType而不设定resultMap就可以了: <selectid="selectByPage"parameterType="java.uti ...
- java中的数据导出到Excel表中
整个项目中导出数据到.Excel的源码 import java.io.BufferedOutputStream; import java.io.FileInputStream; import java ...
- vue项目结构搭建
1安装node.js,已集成npm 2.临时使用淘宝镜像 npm --registry https://registry.npm.taobao.org install express 3.instal ...
- Java框架spring Boot学习笔记(三):Controller的使用
Controller注解介绍 @Controller:处理http请求 @RestController: Spirng4之后新加的注解,其实是一个组合注解等同于@ResponseBody和@Contr ...
- vim 常用指令总结
vim的好处(四大好处) vim具有大量的操作技巧,编辑能力强大且速度比其他工具快的多! (这里举个简单的小例子:将每行的前四个字母复制到每行的末尾; 将文本中的所有word替换为words; 等等很 ...
- pwnable.kr-col-witeup
和上道题类似,先看看col.c代码呗. 欧克,此程序可以查看flag内容,下载下来慢慢分析. 好叭,他是要输入20个字节,然后每4个字节分块这样相加,结果和0x21DD09EC比较. 先验尝试可知,不 ...