When you have a dependency that does not export itself properly, you can use the exports-loader to force it to export the pieces of the file that you ...
分类:
Web程序 时间:
2016-06-25 06:05:54
阅读次数:
170
一、建立简单的项目目录 1、创建 manager 根目录(作为项目根目录)2、执行 npm init,在根目录manager下自动生成 package.json文件3、npm install webpack --save-dev,在项目中安装 webpack npm包4、在根目录下 创建 webpa ...
分类:
Web程序 时间:
2016-06-24 19:01:29
阅读次数:
246
碎碎念: 好久不见,最近自己有些懈怠没更过多少博,主要原因之一是对自己学习方式的一些思考,翻看之前的博客多是记录学习笔记这反映出了自己对于前端还停留在学习-复习知识点的阶段压根没多少实践经验啊这让我有些惶恐,原因之二是前段时间接触并了解性地学习了amd,cmd模块,angular和vue,一些模板引 ...
分类:
Web程序 时间:
2016-06-24 14:51:21
阅读次数:
402
webpack: [webpack-howto] [webpack] [http://www.infoq.com/cn/articles/react-and-webpack] JS相关: [javascript weekly] [javascript标准参考教程] --阮一峰的参考教程,可读性很好, ...
分类:
其他好文 时间:
2016-06-23 23:56:09
阅读次数:
163
If you have a multi-page application (as opposed to a single page app), you’re likely sharing modules between these pages. By chunking these common mo ...
分类:
移动开发 时间:
2016-06-23 06:25:40
阅读次数:
475
Often, you have dependencies which you rarely change. In these cases, you can leverage the CommonsChunkPlugin to automatically put these modules in a ...
分类:
Web程序 时间:
2016-06-23 06:24:09
阅读次数:
227
Leveraging the browser cache is an important part of page load performance. A great way to utilize this cache is by versioning your resources. In this ...
分类:
Web程序 时间:
2016-06-22 23:17:24
阅读次数:
339
If you're going to use code splitting with Webpack 2, you'll need to make sure the browser has support for the ES6 Promise API. This means that if you ...
分类:
Web程序 时间:
2016-06-22 22:05:49
阅读次数:
667
As a Single Page Application grows in size, the size of the payload can become a real problem for performance. In this lesson, learn how to leverage c ...
分类:
Web程序 时间:
2016-06-22 21:53:35
阅读次数:
158
1.要用es6,因为目前浏览器的支持情况,那么肯定需要插件将e6的代码转换成es5,我用的是babel-loader,事实证明使用6.x版本似乎是不行的,我换成5.3.2之后就成功了。 2.webpack.config.js配置文件中,配置loader的时候,我从网上博客中copy的 有空整理一下配 ...
分类:
Web程序 时间:
2016-06-22 15:42:26
阅读次数:
142