摘要: 1. 浮动 float 官方描述:float 指定一个元素应沿其容器的左侧或右侧放置,允许文本和内联元素环绕它。该元素从网页的正常流动(文档流)中移除,尽管仍然保持部分的流动性 通俗解释:指定一个元素,他只能浮动在当前容器里的左侧或者右侧,浮动元素不会影响当前容器里块级元素的布局,但会影响当前容器里 阅读全文
posted @ 2022-06-17 23:57 艾若菲 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 1. 问题&现象 上代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewpor 阅读全文
posted @ 2022-06-17 13:31 艾若菲 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 现象: 电脑型号:Apple M1 启动 vite项目时,终端报: FATAL ERROR: wasm code commit Allocation failed - process out of memory 1: 0x10283d758 node::Abort() [/Users/yangyan 阅读全文
posted @ 2022-04-08 17:33 艾若菲 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 想用 nvm 卸载掉当前版本的node, 发现不成功,报这个错: ➜ ✗ nvm uninstall v12.22.10 nvm: Cannot uninstall currently-active node version, v12.22.10 (inferred from v12.22.10). 阅读全文
posted @ 2022-04-08 17:18 艾若菲 阅读(843) 评论(0) 推荐(0) 编辑
摘要: 本地项目 vite 使用 1. 安装 vite以及相关的插件 npm install -D vite npm install -D vite-plugin-vue2 npm install -D @originjs/vite-plugin-require-context npm install -D 阅读全文
posted @ 2022-03-03 13:23 艾若菲 阅读(2577) 评论(0) 推荐(0) 编辑
摘要: 先来一张图: 从图中,我们可以看到,sass 有6个实现,他们都是用来将sass编译成css的工具。 下边我们来专门说一下 sass、dart-sass 和 node-sass: sass 是由 ts调用 dart-sass实现的工具类,来编译 sass(以前是由单纯的 ts实现的) dart-sa 阅读全文
posted @ 2022-03-02 11:04 艾若菲 阅读(6467) 评论(0) 推荐(0) 编辑
摘要: code.matchAll(...) is not a function 是因为 node 版本太低导致的以上问题 支持 code.matchAll() 方法的 node 版本必须是 >= 12 以上的版本,我这边用的 v12.14.1 的版本,是支持的 如何安装 Node 新版本可以去参考 htt 阅读全文
posted @ 2022-02-28 21:10 艾若菲 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 目前 vite 还不是很成熟,因为他的启动速度快,以至于我们想在开发环境使用它,生产还是继续使用webpack,也就是vite + webpack 共存的情况下: vite 有个插件 vite-plugin-require-transform 会自动把 require() 函数转化为 import 阅读全文
posted @ 2022-02-25 15:20 艾若菲 阅读(2565) 评论(0) 推荐(0) 编辑
摘要: 2个月前 给本地项目添加了vite 构建工具,一直懒得去总结,想想还是要总结一下,就先从记录解决问题开始。 其中有个报错 `Uncaught Error: Dynamic require of ... is not supported`,vite 为什么要把第三方插件里面有些require() 转成 阅读全文
posted @ 2022-02-25 15:00 艾若菲 阅读(4767) 评论(4) 推荐(0) 编辑
摘要: nvm 在 bash shell 下边可以运行,但是切换到 zsh shell 下边,就报 zsh: command not found:nvm 原因: 我们可以去对比一下 .bashrc 和 .zshrc 文件,发现 .bashrc 里面有一段代码: export NVM_DIR="$HOME/. 阅读全文
posted @ 2022-02-11 16:19 艾若菲 阅读(5078) 评论(0) 推荐(0) 编辑