Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit f82bfd0

Browse files
committed
[Chore] Move assets font url.
1 parent 3300b5b commit f82bfd0

8 files changed

+19
-15
lines changed

config/base.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let baseConfig = {
1818
},
1919
assets: [
2020
{
21-
from: 'src/assets',
21+
from: 'src/static',
2222
to: 'static'
2323
}
2424
]

config/webpack.base.babel.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ let webpackBaseConfig = {
7878
loader: 'file-loader',
7979
options: {
8080
limit: 10000,
81-
publicPath: './',
82-
name: baseConfig.dir.dist.fonts + '/' + '[name].[ext]'
81+
name: baseConfig.dir.dist.fonts + '/' + '[name].[ext]'
8382
}
8483
},
8584
{

config/webpack.dev.babel.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ import baseConfig from './base.config';
1515

1616
const PROTOCOL = 'http://';
1717

18-
19-
2018
let webpackDevConfig = merge(webpackBaseConfig, {
2119
mode: 'development',
2220
devtool: 'eval-source-map',
2321
output: {
2422
path: pathUtil.resolve(baseConfig.dir.build),
25-
publicPath: PROTOCOL + baseConfig.dev.host + ':' + baseConfig.dev.port,
23+
publicPath: PROTOCOL + baseConfig.dev.host + ':' + baseConfig.dev.port + '/',
2624
filename: '[name].bundle.js',
2725
sourceMapFilename: '[name].bundle.js.map',
2826
chunkFilename: '[id].chunk.js'
@@ -70,7 +68,7 @@ let webpackDevConfig = merge(webpackBaseConfig, {
7068
chunks: true,
7169
chunkModules: false
7270
},
73-
publicPath: PROTOCOL + baseConfig.dev.host + ':' + baseConfig.dev.port,
71+
publicPath: PROTOCOL + baseConfig.dev.host + ':' + baseConfig.dev.port
7472
}
7573
});
7674

config/webpack.prod.babel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let webpackProdConfig = merge(webpackBaseConfig, {
2020
path: pathUtil.resolve(baseConfig.dir.dist.root),
2121
filename: baseConfig.dir.dist.js + '/' + '[name].[chunkhash].js',
2222
chunkFilename: baseConfig.dir.dist.js + '/' + '[id].[chunkhash].js',
23-
publicPath: baseConfig.prod.context
23+
publicPath: baseConfig.prod.context + '/'
2424
},
2525
module: {
2626
rules: [

src/fonts.css

+14-7
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,39 @@
22
font-family: 'Roboto';
33
font-style: normal;
44
font-weight: 400;
5-
src: local(Roboto), url(./assets/fonts/roboto.woff) format('woff');
5+
src: local(Roboto), url(static/fonts/roboto.woff) format('woff');
66
}
77

88
body * {
9-
font-family: 'Roboto';
9+
font-family: 'Roboto', sans-serif;
1010
}
1111

1212
@font-face {
1313
font-family: 'Material Icons';
1414
font-style: normal;
1515
font-weight: 400;
16-
src: url(./assets/fonts/material-icons.woff2) format('woff2');
16+
src: local('Material Icons'), url(static/fonts/material-icons.woff2) format('woff2');
1717
}
1818

1919
.material-icons {
2020
font-family: 'Material Icons';
2121
font-weight: normal;
2222
font-style: normal;
2323
font-size: 24px;
24+
display: inline-block;
2425
line-height: 1;
25-
letter-spacing: normal;
2626
text-transform: none;
27-
display: inline-block;
28-
white-space: nowrap;
27+
letter-spacing: normal;
2928
word-wrap: normal;
29+
white-space: nowrap;
3030
direction: ltr;
31-
-webkit-font-feature-settings: 'liga';
31+
32+
/* Support for all WebKit browsers. */
3233
-webkit-font-smoothing: antialiased;
34+
/* Support for Safari and Chrome. */
35+
text-rendering: optimizeLegibility;
36+
/* Support for Firefox. */
37+
-moz-osx-font-smoothing: grayscale;
38+
/* Support for IE. */
39+
font-feature-settings: 'liga';
3340
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)