07 2020 档案

摘要:在开发中,遇到文件中引入webpack,但是webpack.ICompiler不一致的情况 //import webpack from 'webpack'; import webpackHot from 'webpack-hot-middleware'; const hotMiddleware = 阅读全文

posted @ 2020-07-30 15:34 KyleLjc 阅读(501) 评论(0) 推荐(0)

摘要:typescritp报错: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: string; b: string; }'. No index signature with a parameter of type 'string' was found on type '{ a: string; b: string; } 阅读全文

posted @ 2020-07-24 14:50 KyleLjc 阅读(12466) 评论(0) 推荐(3)

摘要:自定义loader基本方法,节选自 webpack实战。 1、loader初始化 如果已知loader无法满足我们的需求的时候,就需要动手开发一个定制的loader,我们将实现一个loader:它会为所有的JS文件启用严格模式,也就是说它会在文件头部加上如下代码: "use strict"; 创建一 阅读全文

posted @ 2020-07-18 16:15 KyleLjc 阅读(1571) 评论(0) 推荐(0)

导航