上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 38 下一页
  2019年11月17日
摘要: 第一步:装包 安装完提示警告 peerDependencies WARNING less loader@ requires a peer of less@^2.3.1 || ^3.0.0 but none was installed 执行以下命令安装less less是less loader内部依赖 阅读全文
posted @ 2019-11-17 15:14 songsong_p_blue 阅读(1837) 评论(0) 推荐(0) 编辑
摘要: 注意:webpack处理第三方文件类型的过程: 1.发现这个要处理的文件不是JS文件,然后就去配置文件中,查找有没有对应的第三方loader规则 2.如果能找到对应的规则,就会调用对应的loader处理这种文件类型; 3.在调用loader的时候,是从后往前调用的; 4.当最后的一个loader调用 阅读全文
posted @ 2019-11-17 11:49 songsong_p_blue 阅读(254) 评论(0) 推荐(0) 编辑
摘要: ` 阅读全文
posted @ 2019-11-17 11:36 songsong_p_blue 阅读(191) 评论(0) 推荐(0) 编辑
摘要: html webpack plugin的作用: 1.在内存中根据我们的index模板页面,生成一个内存里面的首页 2.当使用html webpack plugin之后,我们不再需要手动处理bundle.js的引用路径了, 因为这个插件,已经帮我们自动创建了一个合适的script,并且,引用了正确的路 阅读全文
posted @ 2019-11-17 10:53 songsong_p_blue 阅读(655) 评论(0) 推荐(0) 编辑
摘要: ``` // 导入webpack模块,这是启用热更新的第2步 const webpack=require('webpack') devServer:{ // 这是配置dev-server命令参数的第二种形式,相对来说,这种方式麻烦一些 // --open --port 3000 --contentBase src --hot open:true,//自动打开浏览器 port:3000,//设置启动 阅读全文
posted @ 2019-11-17 10:22 songsong_p_blue 阅读(179) 评论(0) 推荐(0) 编辑
摘要: open 自动打开浏览器 port 3000 指定端口3000 contentBase src 内容的根路径 hot 热重载,热更新。打补丁,实现浏览器的无刷新 阅读全文
posted @ 2019-11-17 10:03 songsong_p_blue 阅读(945) 评论(0) 推荐(0) 编辑
  2019年11月16日
摘要: 使用webpack dev server这个工具,来实现自动打包编译的功能 1.运行 npm i webpack dev server D 把这个工具安装到项目的本地开发依赖 或者运行 cnpm i webpack dev server D 安装 2.安装完毕后,这个工具的用法,和webpack命令 阅读全文
posted @ 2019-11-16 23:47 songsong_p_blue 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 在项目根目录下新建webpack.config.js文件 webpack.config.js文件配置如下: 阅读全文
posted @ 2019-11-16 17:17 songsong_p_blue 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 什么是webpack? webpack是前端的一个项目构建工具,它是基于Node.js开发出来的一个前端工具; webpack安装的两种方式 1.运行 'npm i webpack g' 全局安装webpack,这样就能在全局使用webpack的命令 2.在项目根目录中运行'npm i webpac 阅读全文
posted @ 2019-11-16 11:03 songsong_p_blue 阅读(162) 评论(0) 推荐(0) 编辑
  2019年11月3日
摘要: 1.启动nginx命令./sbin/nginx 2.提示80端口被占用 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)nginx: [emerg] bind() to 0.0.0.0:80 failed 阅读全文
posted @ 2019-11-03 19:52 songsong_p_blue 阅读(2091) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 38 下一页