Browse Source

Fix fonts.

pull/705/head
Sebastian 5 years ago
parent
commit
b37398dedd
  1. 29
      frontend/app-config/webpack.config.js
  2. 2
      frontend/app/features/dashboard/pages/dashboard-page.component.scss
  3. 2
      frontend/app/features/settings/pages/more/more-page.component.scss
  4. 2
      frontend/app/shared/components/assets/asset.component.scss

29
frontend/app-config/webpack.config.js

@ -44,11 +44,11 @@ const plugins = {
};
module.exports = function calculateConfig(env) {
const isDevServer = path.basename(require.main.filename) === 'webpack-dev-server.js';
const isProduction = env && env.production;
const isTests = env && env.target === 'tests';
const isTestCoverage = env && env.coverage;
const isAnalyzing = isProduction && env.analyze;
const isDevServer = env.WEBPACK_SERVE;
const isTestCoverage = env && env.coverage;
const isTests = env && env.target === 'tests';
const isAot = !isDevServer && !isTests && !isTestCoverage;
const configFile = isTests ? 'tsconfig.spec.json' : 'tsconfig.app.json';
@ -132,20 +132,24 @@ module.exports = function calculateConfig(env) {
}, {
test: /\.(woff|woff2|ttf|eot)(\?.*$|$)/,
use: [{
loader: 'file-loader?name=[name].[fullhash].[ext]',
loader: 'file-loader',
options: {
name: '[name].[hash].[ext]',
// Store the assets in custom path because of fonts need relative urls.
outputPath: 'assets',
/*
* Use custom public path as ./ is not supported by fonts.
*/
// Use custom public path as ./ is not supported by fonts.
publicPath: isDevServer ? undefined : 'assets',
},
}],
}, {
test: /\.(png|jpe?g|gif|svg|ico)(\?.*$|$)/,
use: [{
loader: 'file-loader?name=[name].[fullhash].[ext]',
loader: 'file-loader',
options: {
name: '[name].[hash].[ext]',
// Store the assets in custom path because of fonts need relative urls.
outputPath: 'assets',
},
}],
@ -415,7 +419,10 @@ module.exports = function calculateConfig(env) {
config.module.rules.push({
test: /\.ts$/,
use: [{
loader: 'istanbul-instrumenter-loader?esModules=true',
loader: 'istanbul-instrumenter-loader',
options: {
esModules: true,
},
}, {
loader: 'ts-loader',
}],
@ -467,9 +474,7 @@ module.exports = function calculateConfig(env) {
sourceMap: true,
},
}],
/*
* Do not include component styles.
*/
// Do not include component styles.
include: root('app', 'theme'),
});
}

2
frontend/app/features/dashboard/pages/dashboard-page.component.scss

@ -85,7 +85,7 @@ gridster-item {
&-title {
color: $color-title;
font-size: 1.2rem;
font-weight: lighter;
font-weight: normal;
margin-top: 1rem;
}

2
frontend/app/features/settings/pages/more/more-page.component.scss

@ -53,7 +53,7 @@
&-text {
font-size: 1.25rem;
font-weight: lighter;
font-weight: normal;
position: absolute;
}
}

2
frontend/app/shared/components/assets/asset.component.scss

@ -267,7 +267,7 @@ $list-height: 2.25rem;
&-text {
font-size: 1.25rem;
font-weight: lighter;
font-weight: normal;
position: absolute;
}
}

Loading…
Cancel
Save