浮声新志

山峰永不相遇,而人人却处处相逢。


  • 首页

  • 归档

  • 标签
浮声新志

webpack插件篇:I18nPlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

I18nPlugin (本地化插件)

Create bundles with translations baked in. Then you can serve the translated bundle to your clients.

webpack.config.js配置

1
new I18nPlugin(translations: Object, fnName = "__": String)

案例

1
2
浮声新志

webpack插件篇:NgRequirePlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

()

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:RewirePlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

()

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:ProvidePlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

ProvidePlugin (全局挂载插件)

自动加载模块,当配置($:’jquery’)例如当使用$时,自动加载jquery

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:DefinePlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

()

定义变量,一般用于开发环境log或者全局变量

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:AngularPlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

AngularPlugin ()

Use angular.js modules with webpack.

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:LabeledModulesPlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

LabeledModulesPlugin ()

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:ImageminPlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

ImageminPlugin ()

Compresses and optimizes your images using Imagemin. Unlike image-webpack-loader this will also optimize images from plugins like favicons-webpack-plugin.

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:SWPrecacheWebpackPlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

()

Use a service worker to cache all your bundles’ emitted assets. This plugin will generate a service worker file using sw-precache then add it to your build directory. You can optionally pass your own sw-precache config options.

webpack.config.js配置

1
2

案例

1
2
浮声新志

webpack插件篇:OfflinePlugin详解

发表于 2017-02-17 | 分类于 webpack |

用途说明

OfflinePlugin ()

Plugin which brings offline support into your project. It generates ServiceWorker based on output files and chosen update strategy. AppCache is used as a fallback when ServiceWorker is not available.

webpack.config.js配置

1
2

案例

1
2
1234…8
蒋万万

蒋万万

72 精选教程
8 技术分类
10 技术标签
RSS
© 2017 蒋万万
由 Hexo 强力驱动
主题 - NexT.Mist