Commit efe3589d authored by Jacob Karlsson's avatar Jacob Karlsson
Browse files

Make icons load

parent 0a054daa
<!DOCTYPE html>
<html>
<head>
<title>Getting Started</title>
<title>Manyverse</title>
</head>
<body>
<!--<h1>Hello World!</h1>
We are using node
<script>
document.write(process.versions.node);</script
>, Chrome
<script>
document.write(process.versions.chrome);</script
>, and Electron
<script>
document.write(process.versions.electron);</script
>.-->
<div id="app"></div>
<script src="./dist/main.js"></script>
</body>
......
......@@ -53,6 +53,7 @@ module.exports = {
},
module: {
rules: [
babelLoaderConfiguration,
{
test: /\.(png|jpe?g|gif)$/i,
use: [
......@@ -61,7 +62,21 @@ module.exports = {
},
],
},
babelLoaderConfiguration,
{
test: /\.ttf$/,
use: [
{
loader: 'file-loader',
options: {
esModule: false,
},
},
],
include: path.resolve(
__dirname,
'../node_modules/react-native-vector-icons',
),
},
],
},
plugins: [
......
......@@ -17,6 +17,15 @@ import {makeEventBusDriver} from '../frontend/drivers/eventbus';
import {makeLocalizationDriver} from '../frontend/drivers/localization';
import {global} from '../frontend/screens/global';
import {thread} from '../frontend/screens/thread';
const iconFont = require('react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf');
const iconFontStyles = `@font-face {
src: url(dist/${iconFont});
font-family: MaterialCommunityIcons;
}`;
const style = document.createElement('style');
style.appendChild(document.createTextNode(iconFontStyles));
document.head.appendChild(style);
const engine = setupReusable({
asyncstorage: asyncStorageDriver,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment