个人博客
-
Node.js爬虫之使用cheerio爬取图片
引入 在[上一篇文章](https://www.zihanzy.com/articles/212)我们利用Node.js实现了一个基本的爬虫,但是要写很长的正则--实在太累了而且需要对正则绝对熟悉。 在写前端我们都知道jQuery能方便帮我我们进行各种DOM操... -
Node.js爬虫之爬取1905电影网
我们主要爬取这个页面 https://www.1905.com/vod/list/n_1/o3p1.html  我们爬取类型板块的... -
esLint基本使用
1. `npm i eslint eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-html ` 2.新键配置文件`.eslintrc` { "extends": "standa... -
Module build failed (from ./node_modules/babel-loader/lib/index.js)
 解决 npm install -D babel-loader @babel/core @babel/preset-env { "presets":[... -
webpack搭建基础vue项目
新键目录 src APP.vue index.js `npm init -y ` `npm i vue vue-loader vue-template-compiler cross-env css-loader style-loader url-loader file-loader html-webpack-plugin webpack-dev-serv... -
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your
解决办法 添加插件 ... const VueLoaderPlugin = require('vue-loader/lib/plugin') plugins:[ new VueLoaderPlugin() ] ... -
webpack优化
noParse oParse作用主要是过滤不需要解析的文件,比如打包的时候依赖了三方库 如 jquyer,而jquery是一个单独的库没有其他依赖,这个时候可以通过配置noParse不去解析文件,提高打包效率 多个用 | 分隔 ... modul... -
webpack性能优化之externals 与 DllPlugin
externals和DllPlugin都是为了分离模块诞生,通过他们可以将一些第三方模块抽离出来,打包的时候不需将某些三方库一起打包如vue、vue-router 这样提高了编译速度,减少了包的大小 利于浏览器的缓存机制,不用每次都... -
devServer配置实现跨域
服务端 const express = require('express'); let server = express(); server.listen(3000); server.get('/api/user',(req,res,next)=>{ res.send('aa'); }) 客户端 let xhr = new XMLHttpRequest(); x... -
webpack打包多页应用
目录结构 │ package.json │ webpack.config.js │ └─src index.html index.js other.html other.js 项目有两个入口文件,对应两个html 我们在webpack.config.js进行如下配置...