mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Add support for locally hosted fonts
This commit is contained in:
@@ -15,6 +15,9 @@ module.exports = (env) => {
|
||||
let copyWebpackOptions = [{
|
||||
from: path.join(__dirname, '..', 'node_modules', '@fortawesome', 'fontawesome-free', 'webfonts'),
|
||||
to: path.join('assets', 'fonts')
|
||||
}, {
|
||||
from: path.join(__dirname, '..', 'resources', 'fonts'),
|
||||
to: path.join('assets', 'fonts')
|
||||
}, {
|
||||
from: path.join(__dirname, '..', 'resources', 'images'),
|
||||
to: path.join('assets', 'images')
|
||||
@@ -24,6 +27,15 @@ module.exports = (env) => {
|
||||
}
|
||||
];
|
||||
|
||||
const themeFonts = path.join(themePath, 'resources', 'fonts');
|
||||
if(theme && fs.existsSync(themeFonts)) {
|
||||
copyWebpackOptions.push({
|
||||
from: themeFonts,
|
||||
to: path.join('assets', 'fonts') ,
|
||||
force: true,
|
||||
});
|
||||
}
|
||||
|
||||
const themeImages = path.join(themePath, 'resources', 'images');
|
||||
if(theme && fs.existsSync(themeImages)) {
|
||||
copyWebpackOptions.push({
|
||||
@@ -161,7 +173,7 @@ module.exports = (env) => {
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
test: /\.(html|eot|ttf|svg|woff|woff2)$/,
|
||||
loader: 'raw-loader'
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user