Improve icons & css & seo & a11y

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-13 18:21:35 +02:00
parent 717ef84ab8
commit 5676852206
18 changed files with 154 additions and 39 deletions

View File

@@ -1,5 +1,7 @@
const Dotenv = require('dotenv-webpack');
const path = require('path');
const PurgecssPlugin = require('purgecss-webpack-plugin');
const glob = require('glob-all');
module.exports = {
pluginOptions: {
@@ -13,6 +15,13 @@ module.exports = {
configureWebpack: {
plugins: [
new Dotenv({ path: path.resolve(process.cwd(), '../.env') }),
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './public/index.html'),
path.join(__dirname, './src/**/*.vue'),
path.join(__dirname, './src/**/*.ts')
])
})
],
module: {
rules: [ // fixes https://github.com/graphql/graphql-js/issues/1272
@@ -46,6 +55,23 @@ module.exports = {
.rule("vue")
.use("vue-svg-inline-loader")
.loader("vue-svg-inline-loader")
.options({ /* ... */ });
.options({
addAttributes: {
role: "img",
focusable: false,
tabindex: -1,
'aria-labelledby': "MobilizonLogoTitle"
},
svgo: {
plugins: [
{
removeTitle: false,
},
{
cleanupIDs: false
}
]
}
});
}
};