Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
note520 authored Nov 29, 2019
1 parent 40c9cdf commit 394478c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ plugins:[
window.asyncPublicPath = "http://localtest.me/webpackCode/webpack-bundle-public-path-plugin/example/dist/"
```

##### 可能会遇到的问题
- 配合其他插件有有涉及 publicPath 的地方需要谨慎使用,比如 mini-css-extract-plugin
```
// mini-css-extract-plugin 修复的方法如下
{
loader: MiniCssExtractPlugin.loader,
options: {
// 重置publicPath
publicPath: (resourcePath, context) => {
return "";
}
}
},
```

##### 演示截屏
- ![avatar](./docs/demo1.png)
- ![avatar](./docs/demo2.png)
Expand Down

0 comments on commit 394478c

Please sign in to comment.