Skip to content
Snippets Groups Projects
Commit b34e6363 authored by Art Lowel's avatar Art Lowel
Browse files

Add support for locally hosted fonts

parent 3c0adf9b
No related branches found
No related tags found
No related merge requests found
......@@ -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'
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment