摘要:
1、配置webpack不需要安装什么,只需要原先安装的webpack即可配置 const path = require('path') const webpack = require('webpack') module.exports = { mode: 'production', entry: { 阅读全文
摘要:
1、安装项目需要文件 yarn add webpack webpack-cli html-webpack-plugin clean-webpack-plugin 2、项目配置如下 const HtmlWebpackPlugin = require('html-webpack-plugin') con 阅读全文
摘要:
1、安装项目需要文件 yarn add webpack webpack-cli webpack-dev-middleware express html-webpack-plugin 2、项目配置如下 const HtmlWebpackPlugin=require('html-webpack-plug 阅读全文
摘要:
//使用webpack-dev-server,可以用http启动本地项目,方便发起http请求,file本地不能发请求 1、安装webpack、webpack-cli@3.3.12、webpack-dev-server yarn add webpack webpack-cli@3.3.12 webp 阅读全文
摘要:
1、url-loader的作用是将图片打包成base64字符串,不用在服务器单独请求图片,从而提升项目请求速度 //commonjs const path = require('path'); module.exports = { mode: 'production', devtool:'sourc 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
摘要:
1、可以看以下简单的图,初步理解js异步执行的环境 2、异步代码执行时,首先看下宏任务a=settimeout 执行的顺序 2.1、a=settimeout 先进入call stack(调用栈),调用栈调用a,a进入web apis 中等待倒计时结束,call stack继续执行下面的代码。 2.2 阅读全文
摘要:
1、引入添加兼容前缀库 npm install postcss-loader autoprefixer@9.8.6 -D //autoprefixer使用9.8.6版本,笔者亲测,兼容PostCSS依赖的版本。 2、在项目根目录下创建postcss.config.js,配置如下: module.ex 阅读全文
摘要:
1、引入tinymce npm install --save @tinymce/tinymce-react 2、在public中引入tinymce的静态文件,下载地址: https://files.cnblogs.com/files/uimeigui/tinymce.zip //如果上述地址不能用, 阅读全文
摘要:
小程序官方代码如下(自定义tabbar组件) Component({ data: { selected: 0, //代表当前激活状态 color: "#7A7E83", selectedColor: "#3cc51f", list: [{ pagePath: "/index/index", //ap 阅读全文