build: remove file loader and migrate to asset modules webpack for font assets (#4380)

* build: use type:javascript/auto so font file assets aren't duplicated

* update changelog

* remove file loader and use asset modules

* fix
This commit is contained in:
Aakansha Doshi
2021-12-08 15:56:25 +05:30
committed by GitHub
parent dfbfbc3f11
commit 6e391728fe
5 changed files with 8 additions and 41 deletions
@@ -15,6 +15,8 @@ module.exports = {
libraryTarget: "umd",
filename: "[name].js",
chunkFilename: "excalidraw-assets-dev/[name]-[contenthash].js",
assetModuleFilename: "excalidraw-assets-dev/[name][ext]",
publicPath: "",
},
resolve: {
@@ -54,15 +56,7 @@ module.exports = {
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: [
{
loader: "file-loader",
options: {
name: "[name].[ext]",
outputPath: "excalidraw-assets-dev",
},
},
],
type: "asset/resource",
},
],
},