Skip to content

Commit 9919d1b

Browse files
committed
refactor: use alterAssetTags hook + drop webpack v3 support
1 parent 2065e58 commit 9919d1b

24 files changed

+5570
-14815
lines changed

.eslintrc.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
module.exports = {
2-
extends: ['eslint:recommended', 'google'],
2+
extends: [
3+
'plugin:vue-libs/recommended'
4+
],
35
env: {
46
node: true,
57
es6: true,
68
},
79
parserOptions: {
810
ecmaVersion: 2017,
9-
},
10-
rules: {
11-
'max-len': [2, 140, {
12-
ignoreComments: true,
13-
ignoreUrls: true,
14-
tabWidth: 2
15-
}],
16-
'require-jsdoc': 0,
17-
'valid-jsdoc': 0,
18-
'comma-dangle': 0,
19-
'arrow-parens': 0,
2011
}
21-
};
12+
}

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
This is a fork of [preload-webpack-plugin](https://github.com/GoogleChromeLabs/preload-webpack-plugin) with a few additions for multi-entry-page webpack setups:
1+
@vue/preload-webpack-plugin
2+
============
3+
[![NPM version][npm-img]][npm-url]
4+
5+
This is a fork of [preload-webpack-plugin](https://github.com/GoogleChromeLabs/preload-webpack-plugin) with a number of changes:
6+
7+
- Uses a combination of `htmlWebpackPluginBeforeHtmlProcessing` and `htmlWebpackPluginAlterAssetTags` hooks to inject links as objects rather than strings. This allows for more flexibility when the tags need to be altered by other plugins.
28

39
- `include` option can be an object in the shape of `{ type?, chunks?, entries? }`. For example, to prefetch async chunks for a specific entry point:
410

@@ -14,16 +20,12 @@ This is a fork of [preload-webpack-plugin](https://github.com/GoogleChromeLabs/p
1420

1521
- Added an `includeHtmlNames` option so that the plugin is only applied to a specific HTML file.
1622

23+
- Drops support for webpack v3.
24+
1725
- Drops support for Node < 6.
1826

1927
---
2028

21-
preload-webpack-plugin
22-
============
23-
[![NPM version][npm-img]][npm-url]
24-
[![NPM downloads][npm-downloads-img]][npm-url]
25-
[![Dependency Status][daviddm-img]][daviddm-url]
26-
2729
![preloads-plugin-compressor](https://cloud.githubusercontent.com/assets/110953/22451103/7700b812-e720-11e6-89e8-a6d4e3533159.png)
2830

2931
A Webpack plugin for automatically wiring up asynchronous (and other types) of JavaScript
@@ -295,8 +297,5 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
295297
License for the specific language governing permissions and limitations under
296298
the License.
297299

298-
[npm-url]: https://npmjs.org/package/preload-webpack-plugin
299-
[npm-img]: https://badge.fury.io/js/preload-webpack-plugin.svg
300-
[npm-downloads-img]: https://img.shields.io/npm/dm/preload-webpack-plugin.svg?style=flat-square
301-
[daviddm-img]: https://david-dm.org/googlechromelabs/preload-webpack-plugin.svg
302-
[daviddm-url]: https://david-dm.org/googlechromelabs/preload-webpack-plugin
300+
[npm-url]: https://www.npmjs.com/package/@vue/preload-webpack-plugin
301+
[npm-img]: https://badge.fury.io/js/%40vue%2Fpreload-webpack-plugin.svg

0 commit comments

Comments
 (0)