摘要: 这里使用webpack4.41.2 为例 一、安装webpack 1、本地安装,安装最新版本或特定版本 如果你使用 webpack 4+ 版本,你还需要安装 CLI 2、全局安装 二、使用webpack 打包 1、方法一,命令行打包方式 2、使用webpack的配置文件来打包 配置文件如下webpa 阅读全文
posted @ 2019-11-10 18:23 远洪 阅读(923) 评论(0) 推荐(0) 编辑
摘要: 转载 原文地址:https://www.jianshu.com/p/001042b2cdfc html中引用了webpack打包后的文件index.html 被打包的js: 提示:index.html:10 Uncaught ReferenceError: test is not defined w 阅读全文
posted @ 2019-11-10 16:57 远洪 阅读(5322) 评论(0) 推荐(0) 编辑
摘要: 转载 原文地址:https://blog.csdn.net/qq_31945977/article/details/81537917 该问题是网络环境导致,解决方法分为两个方面 npm代理和git代理都要设置(首先确认网络是否需要设置代理)讲npm换为国内镜像cnpm,使用淘宝镜像作为下载资源代理的 阅读全文
posted @ 2019-11-10 14:38 远洪 阅读(4647) 评论(0) 推荐(1) 编辑