Skip to content

Commit 8d1278e

Browse files
committed
add include ti font loader
1 parent bfe3fa2 commit 8d1278e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config/loaders.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const path = require('path')
22
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
33
const srcPath = path.resolve(__dirname, '../src')
4+
const nodeModulesPath = path.resolve(__dirname, '../node_modules')
45

56
function isEditor(loaderContext) {
67
return loaderContext.resource.indexOf('editor.scss') > -1
@@ -14,6 +15,7 @@ module.exports = {
1415
/* FontsLoader */ {
1516
test: /\.(woff|woff2)$/,
1617
type: 'asset/resource',
18+
include: [srcPath + '/fonts', nodeModulesPath + '/@fontsource-variable', nodeModulesPath + '/@fontsource'],
1719
generator: {
1820
filename: 'fonts/[name][ext][query]',
1921
},

0 commit comments

Comments
 (0)