Skip to content

Commit 8f4aa2d

Browse files
authored
Merge pull request #343 from BeAPI/feature/fontsource
Feature/fontsource
2 parents f3d1afb + 8d1278e commit 8f4aa2d

14 files changed

+58
-11
lines changed

config/loaders.js

Lines changed: 2 additions & 1 deletion
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,7 +15,7 @@ module.exports = {
1415
/* FontsLoader */ {
1516
test: /\.(woff|woff2)$/,
1617
type: 'asset/resource',
17-
include: srcPath + '/fonts',
18+
include: [srcPath + '/fonts', nodeModulesPath + '/@fontsource-variable', nodeModulesPath + '/@fontsource'],
1819
generator: {
1920
filename: 'fonts/[name][ext][query]',
2021
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"license": "GPL-2.0",
1616
"dependencies": {
17+
"@fontsource/poppins": "^5.0.5",
1718
"lazysizes": "^5.3.2",
1819
"oneloop.js": "^5.0.0",
1920
"what-input": "^5.2.10"

src/fonts/.gitkeep

Whitespace-only changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)