2019.12.19----今天学了啥?
Posted ylweb
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2019.12.19----今天学了啥?相关的知识,希望对你有一定的参考价值。
之所以新建这个分类是因为昨天参加了 《极客时间》的 21天学习行动,就萌生了这个想法来督促自己。写的很随意简单,不占用自己太多时间跟精力。
今天学了啥?
一、早 6:50 -- 7:30
极客时间 《玩转webpack》 10、11讲。其实一直想比较全面的过一遍官网文档,记得刚转前端的时候粗略看过一遍,那时候因为还太菜,所以看完一直没太深影响,在工作中有时候开发会觉得打包效率很低,但是呢这部分又是由我们公司能力比较强一个同事在负责,所以自己现在也想深入研究一遍,能把公司的webpack做一些优化,所以就又开始了webpack的学习。今天主要复习了 entry 与 output 的用法,很简单,所以没什么要深度研究的东西。
entry是为入口起点,单入口是string,多入口object;
output为出口,配置的path为绝对路径,对于多入口要使用占位符来确保文件名称唯一性。
二、 早地铁时间 8.20-9:00
读了周爱民老师在极客专栏《javascript核心原理解析》里关于export/import的一讲。之前在《你不知道的javascript(中卷)》中读到过在es6模块是静态配置,而我们知道nodejs的模块是动态加载的,这意味着js import进来的变量在此文件中是只读的。这篇文章里重点是对export default的解析。其实export出去再import进来还是一个引用的理解,不得不说之前刷了10多遍的《你不知道的javascript(上卷)》的js思想对我理解很多东西产生了极大的影响。在“模块 export/import”语法中 ,JavaScript 是依赖 import 来形成依赖树的,与 export 无关。在处理 export/import 语句的全程,没有表达式被执行!export default function() {}其实就相当于export var default = function() {},其到处的也不是一个匿名函数表达式,只是一个在import文件里名为default的函数(可打印其name值查看)引用。
三、午饭时间 重新开始复习 nicolas的《understanding es6》,怎么说呢,这本书看了很多遍,但总觉得es6还有很多东西理解的不明白,所以就再过一遍吧,从最后的模块部分看的,看的不多,希望这遍结束后能有所成长吧!
!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6IjI4MTMtMTU3NjYyNjA4MjU5OSIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcy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iYmFjay1jb2xvciI6IiNmZmZmZmYifX0seyJjaGFyIjoibyIsInN0eWxlcyI6eyJjb2xvciI6IiMzMzMzMzMiLCJiYWNrLWNvbG9yIjoiI2ZmZmZmZiJ9fSx7ImNoYXIiOiJyIiwic3R5bGVzIjp7ImNvbG9yIjoiIzMzMzMzMyIsImJhY2stY29sb3IiOiIjZmZmZmZmIn19LHsiY2hhciI6InQiLCJzdHlsZXMiOnsiY29sb3IiOiIjMzMzMzMzIiwiYmFjay1jb2xvciI6IiNmZmZmZmYifX0seyJjaGFyIjoiICIsInN0eWxlcyI6eyJjb2xvciI6IiMzMzMzMzMiLCJiYWNrLWNvbG9yIjoiI2ZmZmZmZiJ9fV0sImlzUmljaFRleHQiOnRydWUsImtlZXBMaW5lQnJlYWsiOnRydWV9fV0=-->以上是关于2019.12.19----今天学了啥?的主要内容,如果未能解决你的问题,请参考以下文章