66e67aa816
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
38 lines
923 B
JavaScript
38 lines
923 B
JavaScript
const Dotenv = require('dotenv-webpack');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
lintOnSave: false,
|
|
runtimeCompiler: true,
|
|
outputDir: '../priv/static',
|
|
configureWebpack: {
|
|
plugins: [
|
|
new Dotenv({ path: path.resolve(process.cwd(), '../.env') }),
|
|
],
|
|
module: {
|
|
rules: [ // fixes https://github.com/graphql/graphql-js/issues/1272
|
|
{
|
|
test: /\.mjs$/,
|
|
include: /node_modules/,
|
|
type: 'javascript/auto',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
chainWebpack: config => {
|
|
config
|
|
.plugin('html')
|
|
.tap(args => {
|
|
args[0].minify = {
|
|
collapseWhitespace: true,
|
|
removeComments: false,
|
|
removeRedundantAttributes: true,
|
|
removeScriptTypeAttributes: true,
|
|
removeStyleLinkTypeAttributes: true,
|
|
useShortDoctype: true
|
|
};
|
|
return args
|
|
});
|
|
}
|
|
};
|