Optimize loading fonts

This commit is contained in:
Pig Fang 2018-08-03 10:35:06 +08:00
parent 2927090bb7
commit 43afaa3e8d
8 changed files with 17 additions and 13 deletions

View File

@ -36,8 +36,6 @@
"skinview3d": "^1.1.0-alpha.4",
"sweetalert2": "^7.26.9",
"toastr": "^2.1.4",
"typeface-minecraft": "^1.0.0",
"typeface-ubuntu": "^0.0.54",
"vue": "^2.5.16",
"vuejs-paginate": "^2.0.1"
},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,17 @@
font_stack = Ubuntu, 'Segoe UI', 'Microsoft Yahei', 'Microsoft Jhenghei', sans-serif;
@font-face {
font-family: 'Ubuntu';
src: url('../fonts/ubuntu.woff2') format('woff2'),
url('../fonts/ubuntu.woff') format('woff');
}
@font-face {
font-family: 'Minecraft';
src: url('../fonts/minecraft.woff2') format('woff2'),
url('../fonts/minecraft.woff') format('woff');
}
body, h1, h2, h3, h4, h5, h6, .logo {
font-family: font_stack;
}

View File

@ -18,8 +18,6 @@ module.exports = [{
'font-awesome/css/font-awesome.min.css',
'icheck/skins/square/blue.css',
'toastr/build/toastr.min.css',
'typeface-ubuntu',
'typeface-minecraft',
'./resources/assets/src/stylus/common.styl',
]
},
@ -71,11 +69,15 @@ module.exports = [{
]
},
{
test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)$/,
test: /\.(png|jpg|gif)$/,
loader: 'url-loader',
options: {
limit: 8192
}
},
{
test: /\.(svg|woff2?|eot|ttf)$/,
loader: 'file-loader'
}
],
noParse: /^(vue|jquery)$/

View File

@ -7263,14 +7263,6 @@ typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
typeface-minecraft@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/typeface-minecraft/-/typeface-minecraft-1.0.0.tgz#1624627ed15eff5fb7e70f19807097a5b13ce1c3"
typeface-ubuntu@^0.0.54:
version "0.0.54"
resolved "https://registry.yarnpkg.com/typeface-ubuntu/-/typeface-ubuntu-0.0.54.tgz#1219d28be0a86b9a2d779e53d8b89d13de911ac3"
uglify-es@^3.3.4, "uglify-es@npm:terser":
version "3.8.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-3.8.1.tgz#cb70070ac9e0a71add169dfb63c0a64fca2738ac"