Skip to content

Commit cb94269

Browse files
committed
Fix: add icon fonts to cache (fixes #2)
1 parent dabda8f commit cb94269

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"eslint-plugin-vue": "^4.0.0-beta.0",
2424
"file-loader": "^1.1.5",
2525
"lodash": "^4.17.4",
26+
"material-design-icons": "^3.0.1",
2627
"monaco-editor": "^0.10.1",
2728
"npm-run-all": "^4.1.2",
2829
"rimraf": "^2.6.2",
@@ -40,7 +41,7 @@
4041
"build:html": "appcache-manifest-fixer src/index.html -o dist/index.html",
4142
"build:js": "webpack --progress --hide-modules",
4243
"build:monaco": "node scripts/copy-monaco",
43-
"build:manifest": "appcache-manifest \"dist/**/*.{css,html,js,svg}\" --prefix /vue-eslint-demo --network-star -o dist/index.appcache",
44+
"build:manifest": "appcache-manifest \"dist/**/*.{css,html,js,svg,eot,ttf,woff,woff2}\" --prefix /vue-eslint-demo --network-star -o dist/index.appcache",
4445
"build:versions": "node scripts/make-versions",
4546
"clean": "rimraf dist",
4647
"deploy": "node scripts/deploy",

src/md-icon.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<template functional>
2-
<i
3-
class="material-icons"
4-
:title="title"
5-
>
6-
{{ props.kind }}
7-
</i>
2+
<i class="material-icons" :title="title">{{ props.kind }}</i>
83
</template>
94

105
<script>
@@ -24,7 +19,7 @@ export default {
2419
</script>
2520

2621
<style>
27-
@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
22+
@import url(../node_modules/material-design-icons/iconfont/material-icons.css);
2823
2924
.material-icons {
3025
vertical-align: middle;

webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ module.exports = {
7070
exclude: /node_modules/,
7171
},
7272
{
73-
test: /\.(png|jpg|gif|svg)$/,
73+
test: /\.(png|jpg|gif|svg|eot|ijmap|ttf|woff2?)$/,
7474
loader: "file-loader",
7575
options: {
76-
name: "[name].[ext]?[hash]",
76+
name: "[name].[ext]",
77+
outputPath: "assets/",
78+
publicPath: "./",
7779
},
7880
},
7981
// Replace `./src/versions.js` with the current versions.

0 commit comments

Comments
 (0)