Improve icons & css & seo & a11y
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user