- 浏览: 112371 次
- 性别:
- 来自: 上海
-
最新评论
文章列表
这个系列不错
https://www.cnblogs.com/QH-Jimmy/p/8034891.html
https://mp.weixin.qq.com/s?__biz=MzI3NTM1MjExMg==&mid=2247484647&idx=1&sn=0ffc79ae9c1ca56d972bcb13bedc848e&scene=21#wechat_redirect
https://www.cnblogs.com/qcloud1001/p/8432070.html
https://jeffjade.com/2017/08/12/125-webpack-package-optimization-for-speed/
https://github.com/webpack-china/awesome-webpack-cn/issues/1
前端工程化
- 博客分类:
- JavaScript
https://github.com/hoperyy/blog/issues/114
webpack.js文件有一句代码特别拗口
compiler.apply.apply(compiler, options.plugins);
compiler = new Compiler();
compiler.context = options.context;
compiler.options = options;
new NodeEnvironmentPlugin().apply(compiler);
if(options.plugins && Array.isArray(options.plugins)) {
compiler.a ...
此处module,exports并不是commonJS、CMD、AMD规范的module,exports
而是webpack自定义的对象
module和chunk是不同的设定,
chunk可以理解为一个个的js文件,
module理解为chunk文件的组成部分,根据功能划分的代码块
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ ...
这个方法适用于通过require.ensure或者import()懒加载的模块
chunk分init chunk,entry chunk,normal chunk
init chunk指代不包含runtime代码的chunk,
一般是通过webpack的entry配置的入口
entry chunk指代包含runtime代码的chunk,
一般通过commonchunkplugin处理以后的manifest文件就是entry chunk
normal chunk,剩下的都是normal chunk了,比如通过require.ensure加载的模块
ugly ...
limit配置:
https://blog.csdn.net/qq_38652603/article/details/73835153
通过css文件配置:
.bg{
background-image: url('test.jpg');
}
通过file-loader配置
use: [{
loader: 'url-loader',
options: {
limit: 10000,
...
server side render
- 博客分类:
- vue
https://juejin.im/post/5a9ca40b6fb9a028b77a4aac
https://ssr.vuejs.org/guide/data.html#store-code-splitting
prerender-spa-plugin
- 博客分类:
- vue
预渲染
http://52laoshiji.com/article/848
https://segmentfault.com/a/1190000010613010
imports-loader就是根据预设规则,在require('x')时,将bundle的第三方依赖注入,防止报错
Query value
Equals
angular
var angular = require("angular");
$=jquery
var $ = require("jquery");
define=>false
var define = false;
config=>{size:50}
var config = {size:50};
this=>wind ...
babel-preset-env
- 博客分类:
- babel
https://segmentfault.com/a/1190000010468759
https://excaliburhan.com/post/babel-preset-and-plugins.html
http://2ality.com/2017/02/babel-preset-env.html
只是对require.ensure进行了封装而已
promise-loader返回了promise实例
lazy比较关键,建议看源码一下
注意点:
1.重命名
2.babel-plugin-syntax-dynamic-import
3.Promise
http://doc.okbase.net/stef/archive/260193.html
https://webpack.js.org/guides/code-splitting/
fullpage类似
- 博客分类:
- github
https://github.com/alvarotrigo/fullPage.js
https://github.com/alvarotrigo/pagePiling.js
https://github.com/luruke/barba.js
https://github.com/hakimel/reveal.js
https://github.com/miguel-perez/smoothState.js
ArrayBuffer
- 博客分类:
- JavaScript
https://www.cnblogs.com/copperhaze/p/6149041.html
https://blog.csdn.net/jack__cj/article/details/53026278