mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Merge pull request #3048 from yoichiro/improve-instruction-for-webpack-plugin
Improve the instruction for each Webpack version.
This commit is contained in:
commit
d001070938
1 changed files with 10 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.ttf$/,
|
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`:
|
- `index.js`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue