Upgrade vue-cli to v4, change the way server params injection is made

and serve es6 modules

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-17 14:20:22 +02:00
parent 4b80b8616d
commit 6718dd8e69
10 changed files with 1314 additions and 840 deletions

View File

@@ -1,6 +1,3 @@
const Dotenv = require('dotenv-webpack');
const path = require('path');
module.exports = {
pluginOptions: {
webpackBundleAnalyzer: {
@@ -11,9 +8,6 @@ module.exports = {
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
{
@@ -28,19 +22,14 @@ module.exports = {
}
},
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
// .plugin('html')
// .tap(args => {
// args[0].minify = {
// removeComments: false,
// };
// return args
// });
config.module
.rule("vue")