Skip to content

Commit fe8f0ef

Browse files
author
v_zhihzhou
committed
webpack4 support
1 parent 2fd1206 commit fe8f0ef

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ const MpvuePlugin = require('webpack-mpvue-asset-plugin')
2020
```
2121

2222
bug 或者交流建议等请反馈到 [mpvue/issues](https://github.com/Meituan-Dianping/mpvue/issues)
23+
24+
本仓库是 fork 自 [webpack-mpvue-asset-plugin](https://github.com/mpvue/webpack-mpvue-asset-plugin) 修改而来,主要更新到支持 webpack4。
25+
26+
bug 或者交流建议等请反馈到 [mpvue/issues](https://github.com/Meituan-Dianping/mpvue/issues)
27+
28+
## 安装
29+
30+
```bash
31+
npm install webpack4-mpvue-asset-plugin --save-dev
32+
```

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const getRelativePath = (filePath) => {
1010
}
1111

1212
const emitHandle = (compilation, callback) => {
13-
Object.keys(compilation.entrypoints).forEach(key => {
14-
const { chunks } = compilation.entrypoints[key]
13+
compilation.entrypoints.forEach(({chunks}) => {
1514
const entryChunk = chunks.pop()
1615

1716
entryChunk.files.forEach(filePath => {

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
{
2-
"name": "webpack-mpvue-asset-plugin",
3-
"version": "2.0.0",
2+
"name": "webpack4-mpvue-asset-plugin",
3+
"version": "2.0.1",
44
"main": "index.js",
55
"directories": {
66
"lib": "lib"
77
},
88
"scripts": {
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
11-
"author": "rememberwz <rememberwz@gmail.com>",
11+
"author": "nopast",
1212
"license": "MIT",
1313
"devDependencies": {},
1414
"repository": {
1515
"type": "git",
16-
"url": "git+https://github.com/mpvue/webpack-mpvue-asset-plugin.git"
16+
"url": "https://github.com/BugKun/webpack-mpvue-asset-plugin/tree/feature/webpack4"
1717
},
1818
"keywords": [
19-
"mpvue"
19+
"mpvue",
20+
"webpack4"
2021
],
2122
"bugs": {
2223
"url": "https://github.com/mpvue/webpack-mpvue-asset-plugin/issues"
2324
},
24-
"homepage": "https://github.com/mpvue/webpack-mpvue-asset-plugin#readme",
25+
"homepage": "https://github.com/BugKun/webpack-mpvue-asset-plugin/tree/feature/webpack4#readme",
2526
"description": "",
2627
"dependencies": {
2728
"relative": "^3.0.2",

0 commit comments

Comments
 (0)