Skip to content

Commit fe30248

Browse files
committed
针对extract-text-webpack-plugin 导致图片引用路径混乱,修改为绝对地址。具体请查看更新文档。
1 parent 4db1650 commit fe30248

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/webpack/modules/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = (dev) => {
4040
loader: 'url-loader',
4141
query: {
4242
limit: 2000,
43-
publicPath: '../../',
43+
publicPath: '/',
4444
name: 'assets/[name]-[hash:8].[ext]'
4545
}
4646
}
@@ -55,7 +55,7 @@ module.exports = (dev) => {
5555
loader: 'url-loader',
5656
query: {
5757
limit: 1,
58-
publicPath: '../../',
58+
publicPath: '/',
5959
name: 'assets/[name]-[hash:8].[ext]'
6060
}
6161
}

docs/Update.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 更新日志
22

33
## v2.0.0
4+
* 2017年4月8日: <br />
5+
通过 `extract-text-webpack-plugin` 打包的图片资源引用路径错误混乱,针对次问题,将所有图片路径设置为绝对路径。请务必将 `build` 设置为本目录。<br />
46
* 2017年3月17日: <br />
57
修复资源引用路径 `\\` 错误<br />
68
修复require.ensure资源引用错误<br />

0 commit comments

Comments
 (0)