《玩转webpack》第七章 原理篇: 编写 Loader 和插件| 原理篇:通过源码掌握webpack 打包原理 07 | 原理篇:编写 Loader 和插件 08 | 实战篇:React 全家桶 和webpack 开发商城项目 ## ☐ ☐ ☐ ☐ ## 扫码试看/订阅《玩转webpack》 ## 一 个最简单的 loader 代码结构 定义:loader 只是一个导出为函数的 JavaScript 模块 module.exports = = function(source) { return source; }; ## 多 Loader 时的执行顺序 顺序从后到前 多个 Loader 串行执行 module.exports = { entry: './src/index.js', output: { filename: 'bundle.js', + use: [ + 'style-loader', + 'css-loader', + 'less-loader' + ] + }0 码力 | 29 页 | 4.37 MB | 2 年前3
《玩转webpack》第六章 原理篇: 通过源码掌握 webpack 打包原理进阶篇:编写可维护的webpack 构建配置 05 | 进阶篇:webpack 构建速度和体积优化策略 06 | 原理篇:通过源码掌握webpack 打包原理 07 | 原理篇:编写 Loader 和插件 08 | 实战篇:React 全家桶 和webpack 开发商城项目 ## ☐ ☐ ☐ ☐ ## 扫码试看/订阅《玩转webpack》 ## 开始:从 webpack 命令行说起 // 往 webpack 配置文件中删除属性 "serve", // 运行 webpack-serve "generate-loader", // 生成 webpack loader 代码 "generate-plugin", // 生成 webpack plugin 代码 "info" // 返回与本地环境相关的一些信息 配置相关参数(文件名称、运行环境等) ·Basic options: 基础参数(entry设置、debug模式设置、watch监听设置、devtool设置) ·Module options: 模块参数,给 loader 设置扩展 ·Output options: 输出参数(输出路径、输出文件名称) ·Advanced options: 高级用法(记录设置、缓存设置、监听频率、bail等) ·Resolving0 码力 | 39 页 | 3.66 MB | 2 年前3
《玩转webpack》 第一章 基础篇: webpack 与构建发展简史80208fd789/p3_3.jpg) 框架 DSL 解析 ## 内容综述 从实际 Web 商城项目出发, 讲解 webpack 实际使用 详细剖析 webpack 打包原理和插件、Loader 的实现 以工程化的方式组织 webpack 构建配置,和 webpack 打包优化 webpack 的基本概念和日常开发的实用技巧 实战篇 P8 原理篇 P6–P7 进阶篇 P4–P5 进阶篇:编写可维护的webpack 构建配置 05 | 进阶篇:webpack 构建速度和体积优化策略 06 | 原理篇:通过源码掌握webpack 打包原理 07 | 原理篇:编写 Loader 和插件 08 | 实战篇:React 全家桶 和webpack 开发商城项目 ## 为什么需要构建工具? 转换 ES6 语法 转换 JSX CSS 前缀补全/预处理器 压缩混淆 图片压缩 'production', module: { rules: [ { test: /\.\.txt$/, use: 'raw-loader' } ] }, plugins: [ new HTMLWebpackPlugin({ template: '0 码力 | 17 页 | 690.93 KB | 2 年前3
Celery 2.5 Documentationbecause the tasks will only be registered when the module they are defined in is imported. The default loader imports any modules listed in the CELERY_IMPORTS setting. The entity responsible for registering defaults This document describes the configuration options available. If you’re using the default loader, you must create the celeryconfig.py module and make sure it is available on the Python path. • install Django-Celery 2. Add the following lines to settings.py: import djcelery djcelery.setup_loader() 3. Add djcelery to INSTALLED_APPS. 4. Create the celery database tables. If you are using south0 码力 | 400 页 | 1.40 MB | 2 年前3
The Weblate Manual 4.10cached template loader for Django. It caches parsed templates and avoids the need to do parsing with every single request. You can configure it using the following snippet (the Loader's setting is template.loaders.cached.Loader", ["django.template.loaders.饶子华.loader", ["django.template.loaders.filesystem.Loader", loaders.app_directories.Loader", ["DJI_web_template.loader.loader.loader", ["DJI_web_template.loader.loader.loader",0 码力 | 781 页 | 11.00 MB | 2 年前3
The Weblate Manual 4.9.1cached template loader for Django. It caches parsed templates and avoids the need to do parsing with every single request. You can configure it using the following snippet (the Loader's setting is template.loaders.cached.Loader", ["django.template.loaders.饶子华.loader", ["django.template.loaders.filesystem.Loader", loaders.app_directories.Loader", ["DJI_web_template.loader.loader.loader", ["DJI_web_template.loader.loader.loader",0 码力 | 778 页 | 10.95 MB | 2 年前3
Scrapy 1.3 Documentationetc) without becoming a nightmare to maintain. Using Item Loaders to populate items To use an Item Loader, you must first instantiate it. You can either instantiate it with a dict-like object (e.g. Item instantiated in the Item Loader constructor using the Item class specified in the ItemLoader.default_item_class attribute. Then, you start collecting values into the Item Loader, typically using Selectors one value to the same item field; the Item Loader will know how to “join” those values later using a proper processing function. Here is a typical Item Loader usage in a Spider, using the Product item declared0 码力 | 272 页 | 1.11 MB | 2 年前3
Scrapy 0.9 Documentationbecoming a nightmare to maintain. #### 3.5.1 Using Item Loaders to populate items To use an Item Loader, you must first instantiate it. You can either instantiate it with an dict-like object (e.g. Item instantiated in the Item Loader constructor using the Item class specified in the ItemLoader.default_item_class attribute. Then, you start collecting values into the Item Loader, typically using XPath Selectors value to the same item field, the Item Loader will know how to "join" those values later using a proper processing function. Here is a typical Item Loader usage in a Spider, using the Product item0 码力 | 156 页 | 764.56 KB | 2 年前3
Scrapy 1.2 Documentationetc) without becoming a nightmare to maintain. Using Item Loaders to populate items To use an Item Loader, you must first instantiate it. You can either instantiate it with a dict-like object (e.g. Item instantiated in the Item Loader constructor using the Item class specified in the ItemLoader.default_item_class attribute. Then, you start collecting values into the Item Loader, typically using Selectors one value to the same item field; the Item Loader will know how to “join” those values later using a proper processing function. Here is a typical Item Loader usage in a Spider, using the Product item declared0 码力 | 266 页 | 1.10 MB | 2 年前3
Scrapy 1.1 Documentationetc) without becoming a nightmare to maintain. Using Item Loaders to populate items To use an Item Loader, you must first instantiate it. You can either instantiate it with a dict-like object (e.g. Item instantiated in the Item Loader constructor using the Item class specified in the ItemLoader.default_item_class attribute. Then, you start collecting values into the Item Loader, typically using Selectors the Item Loader will know how to “join” those values later using a proper processing function. 54 Chapter 3. Basic concepts Scrapy Documentation, Release 1.1.3 Here is a typical Item Loader usage in0 码力 | 260 页 | 1.12 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













