摘要: const {resolve} = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry:'./src/index.js', output:{ filenam 阅读全文
posted @ 2020-11-26 03:49 阿jin 阅读(43) 评论(0) 推荐(0)
摘要: const { resolve } = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: resolve(__dirname, 'src/index.j 阅读全文
posted @ 2020-11-26 03:05 阿jin 阅读(59) 评论(0) 推荐(0)
摘要: /** * loader:1. 下载 2. 使用(配置loader) * plugins:1. 下载 2. 引入 3. 使用 */ const { resolve } = require('path') const HtmlWebpackPlugin = require('html-webpack- 阅读全文
posted @ 2020-11-26 02:05 阿jin 阅读(82) 评论(0) 推荐(0)
摘要: /** * webpack.config.js webpack的配置文件 * 作用:指示 webpack 干哪些活(当你运行 webpack 指令时,会加载里面的配置) * * 所有构件工具都是基于nodejs平台运行的~模块化默认采用commonjs */ const { resolve } = 阅读全文
posted @ 2020-11-26 01:28 阿jin 阅读(65) 评论(0) 推荐(0)
摘要: /** * index.js: webpack入口起点文件 * * 1.运行指令: * 开发环境:webpack ./src/index.js -o ./build --mode=development * webpack会以 ./src/index.js 为入口文件开始打包,打包后输出到 ./bu 阅读全文
posted @ 2020-11-26 00:41 阿jin 阅读(46) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-11-26 00:04 阿jin 阅读(49) 评论(0) 推荐(0)
摘要: // 数组去重 var arr = [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 'a', 'a'] Array.prototype.unique = function () { let temp = {}, newArr = [] for (let i = 0; i < th 阅读全文
posted @ 2020-11-24 17:40 阿jin 阅读(154) 评论(0) 推荐(0)
摘要: 正则表达式 英文全称:regular expression(正则表达式) 简称:RegExp 正则表达式是用来处理字符串的规则 它只能用来处理字符串 它是一个规则:可以验证字符串是否符合某个规则 (例如:验证这个字符串 "2020扬帆起航" 中是否包含数字) 也可以把字符串中符合规则的内容捕获到(通 阅读全文
posted @ 2020-04-29 20:52 阿jin 阅读(196) 评论(0) 推荐(0)
摘要: promise异步编程解决方案 第1章 准备 1.1 区别实例对象与函数对象 (1).实例对象:通过 new 函数 产生的对象,称为实例对象,简称对象 (2).函数对象:将函数作为对象使用时,简称函数对象 1.2 两种类型的回调函数 (1). 同步回调: 理解: 立即执行, 完全执行完了才结束, 不 阅读全文
posted @ 2020-04-22 20:49 阿jin 阅读(456) 评论(0) 推荐(1)