源码映射

2019-02-04
阅读 19 分钟
4k
When your source code has gone through transformations, debugging becomes a problem. When debugging in a browser, how to tell where the original code is? Source maps solve this problem by providing a mapping between the original and the transformed source code. In addition to source compiling to ...

08_00_构建

2019-02-04
阅读 1 分钟
1.1k
In this part, you enable source maps on the build, discuss how to split it into separate bundles in various ways, and learn to tidy up the result.本章中,在构建中启用了源码映射,讨论了用不同方法将其分离到不同的Bundle中,以及学习清理结果。

07_04_加载Javascript(webpack book)

2018-12-12
阅读 15 分钟
2.4k
Webpack processes ES2015 module definitions by default and transforms them into code. It does not transform specific syntax, such as const, though. The resulting code can be problematic especially in the older browsers.Webpack默认情况下处理ES015模块定义并转换成代码。但它 不能 转换特殊语法, 如con...

07_03_加载字体(Webpack Book)

2018-12-11
阅读 6 分钟
1.7k
Loading fonts is similar to loading images. It does come with unique challenges, though. How to know what font formats to support? There can be up to four font formats to worry about if you want to provide first class support to each browser.<br/>加载字体与加载图片类似。但是它也伴随着独特的...

07_02_加载图片(Webpack Book)

2018-12-11
阅读 11 分钟
1.4k
HTTP/1 application can be made slow by loading a lot of small assets as each request comes with an overhead. HTTP/2 helps in this regard and changes the situation somewhat drastically. Till then you are stuck with different approaches. Webpack allows a few of these.HTTP/1应用程序由于加载许多小资...

07_01_定义加载器(Webpack Book)

2018-12-11
阅读 11 分钟
1.5k
Webpack provides multiple ways to set up module loaders. Webpack 2 simplified the situation by introducing the use field. It can be a good idea to prefer absolute paths here as they allow you to move configuration without breaking assumptions.Webpack提供多种设置模块加载器的方法。在Webpack 2 中引...

07_00_加载资源(Webpack Book)

2018-12-06
阅读 1 分钟
1.1k
In this part, you will learn how to load different types of assets using webpack’s loaders. Especially images, fonts, and JavaScript receive particular attention. You also learn how webpack’s loader definitions work.在这部分,你将学习如何用Webpack的加载器加载不同类型的资源。尤其要对图片,字体和Ja...