浏览代码

Merge pull request #3048 from yoichiro/improve-instruction-for-webpack-plugin

Improve the instruction for each Webpack version.
Henning Dieterichs 3 年之前
父节点
当前提交
d001070938
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      webpack-plugin/README.md

+ 10 - 1
webpack-plugin/README.md

@@ -30,7 +30,7 @@ module.exports = {
 			},
 			{
 				test: /\.ttf$/,
-				use: ['file-loader']
+				type: 'asset/resource'
 			}
 		]
 	},
@@ -38,6 +38,15 @@ module.exports = {
 };
 ```
 
+If using Webpack 4 or lower, it is necessary to use the file-loader instead of Asset Modules like the code below:
+
+```js
+{
+	test: /\.ttf$/,
+	use: ['file-loader']
+}
+```
+
 - `index.js`:
 
 ```js