摘要:
1. ERR_HTTP_HEADERS_SENT Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 【错误原因】: Express中的 res.send() 或 res.json() 阅读全文
摘要:
场景 Vue2.6.12 模式:单页面应用(SPA)模式 路由模式:history 模式 【问题一】 刷新页面,出现 Cannot GET / xxx 【解决】 设置 historyApiFallback: true webpack.config.js devServer: { ... histor 阅读全文
摘要:
问题描述: webpack 中,通过使用插件 MiniCSSExtractPlugin ,将生成的 css 文件统一放到 dist/css 目录后,css 文件中 url 路径不正确,导致无法正确加载对应资源(比如:图片)。 相关配置: 使用 报错 解决 阅读全文
摘要:
环境: IE 11 vue ^2.6.12 webpack ^5.11.0 webpack-dev-server ^3.11.0 babel ^7.12.10 问题一:开发模式下,chrome 上正常,IE11 上白屏并有报错信息 SCRIPT1002: 语法错误 #####【解决】 问题二:Inv 阅读全文
摘要:
正则表达式中常用的模式修正符有i、g、m、s、U、x、a、D、e 等。 它们之间可以组合搭配使用。 i不区分(ignore)大小写; 例如: /abc/i 可以匹配 abc、aBC、Abc g全局(global)匹配 如果不带g,正则过程中字符串从左到右匹配,找到第一个符合条件的即匹配成功,返回 如 阅读全文
摘要:
正则表达式中有些字符具有特殊的含义,如果在匹配中要用到它本来的含义,需要进行转义(在其前面加一个 \ )。下面总结了常见的一些需要转义的特殊字符: $ () * + . [] ? \ ^ {} | 阅读全文
摘要:
ESLint提示: ESLint is disabled since its execution has not been approved or denied yet. Use the light bulb menu to open the approval dialog. 原因分析:ESLint 阅读全文
摘要:
问题描述: .vue 文件中的样式不起作用(或没被插入到 style 标签中) 环境: vue:2.6.12 css-loader:4.3.0 vue-loader-style:4.1.0 webpack 配置 { test: /\.scss$/, use: ['vue-style-loader', 阅读全文
摘要:
使用 html-webpack-plugin 插件 1. 安装 html-webpack-plugin npm install --save-dev html-webpack-plugin 2. 配置 html-webpack-plugin ... const HtmlWebpackPlugin = 阅读全文
摘要:
创建目录(根据需要自己取项目名) mkdir florist 初始化版本库(非必须) cd florist git init 关联远程仓库(非必须) 1. 创建远程仓库 florist(Github) 2. 关联远程仓库 git remote add origin git@github.com:ua 阅读全文