Browse Source

bug fix: font-family error

张延森 6 years ago
parent
commit
6d6f799b9c
5 changed files with 4 additions and 7 deletions
  1. 2
    1
      build/utils.js
  2. 1
    0
      build/webpack.prod.conf.js
  3. 0
    1
      src/App.vue
  4. 1
    1
      src/assets/css/reset.css
  5. 0
    4
      src/pages/font.css

+ 2
- 1
build/utils.js View File

47
     if (options.extract) {
47
     if (options.extract) {
48
       return ExtractTextPlugin.extract({
48
       return ExtractTextPlugin.extract({
49
         use: loaders,
49
         use: loaders,
50
-        fallback: 'vue-style-loader'
50
+        fallback: 'vue-style-loader',
51
+        publicPath: '../../',
51
       })
52
       })
52
     } else {
53
     } else {
53
       return ['vue-style-loader'].concat(loaders)
54
       return ['vue-style-loader'].concat(loaders)

+ 1
- 0
build/webpack.prod.conf.js View File

25
   },
25
   },
26
   devtool: config.build.productionSourceMap ? config.build.devtool : false,
26
   devtool: config.build.productionSourceMap ? config.build.devtool : false,
27
   output: {
27
   output: {
28
+    publicPath: './',
28
     path: config.build.assetsRoot,
29
     path: config.build.assetsRoot,
29
     filename: utils.assetsPath('js/[name].[chunkhash].js'),
30
     filename: utils.assetsPath('js/[name].[chunkhash].js'),
30
     chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
31
     chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')

+ 0
- 1
src/App.vue View File

12
 </script>
12
 </script>
13
 
13
 
14
 <style>
14
 <style>
15
- @import "./../src/pages/font.css";
16
 #app {
15
 #app {
17
   width: 100%;
16
   width: 100%;
18
   height: 100%;
17
   height: 100%;

+ 1
- 1
src/assets/css/reset.css View File

35
 * {
35
 * {
36
   margin: 0;
36
   margin: 0;
37
   padding: 0;
37
   padding: 0;
38
-  font-family: "康熙字典体";
38
+  font-family: 康熙字典体;
39
   -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
39
   -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
40
   -webkit-font-smoothing: antialiased;
40
   -webkit-font-smoothing: antialiased;
41
 }
41
 }

+ 0
- 4
src/pages/font.css View File

1
-@font-face {
2
-  font-family: "康熙字典体";
3
-  /* src:url('./kangxi.ttf')format('opentype'); */
4
- }