mobilizon.chapril.org-mobil.../js/vue.config.js

69 lines
1.5 KiB
JavaScript
Raw Normal View History

const Dotenv = require('dotenv-webpack');
const path = require('path');
module.exports = {
pluginOptions: {
webpackBundleAnalyzer: {
analyzerMode: 'disabled'
}
},
lintOnSave: false,
runtimeCompiler: true,
outputDir: '../priv/static',
configureWebpack: {
plugins: [
new Dotenv({ path: path.resolve(process.cwd(), '../.env') }),
],
2019-01-18 14:47:10 +01:00
module: {
rules: [ // fixes https://github.com/graphql/graphql-js/issues/1272
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
},
],
},
2019-04-17 17:13:20 +02:00
output: {
filename: 'app.js'
}
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].minify = {
collapseWhitespace: true,
removeComments: false,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true
};
return args
});
config.module
.rule("vue")
.use("vue-svg-inline-loader")
.loader("vue-svg-inline-loader")
.options({
addAttributes: {
role: "img",
focusable: false,
tabindex: -1,
'aria-labelledby': "MobilizonLogoTitle"
},
svgo: {
plugins: [
{
removeTitle: false,
},
{
cleanupIDs: false
}
]
}
});
}
};