diff --git a/package.json b/package.json index 0f84364925906124a7f6e010b0854b696e73304d..38b42a9ac5ccfcbcf6873b75a2b7b1673f5f6755 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "dotenv-webpack": "^1.7.0", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", - "vue-template-compiler": "^2.6.10" + "vue-template-compiler": "^2.6.10", + "webpack-bundle-analyzer": "^3.3.2" }, "eslintConfig": { "root": true, diff --git a/src/components/MastodonForm.vue b/src/components/MastodonForm.vue index 5d18d6eadd549ef0adc9b31de4e2623644b7f5e4..ad011a8d6b071fa31f37ba3742a439d4a694500f 100644 --- a/src/components/MastodonForm.vue +++ b/src/components/MastodonForm.vue @@ -3,7 +3,7 @@ <form @submit.prevent="submit"> <div class="row"> <div class="input-field col s12 l6"> - <input v-model="domain" id="domain" placeholder="mastodon.server" type="text" class="validate"> + <input v-model="domain" id="domain" placeholder="mastodon.domain" type="text" class="validate"> <label class="active" for="domain">Mastodon domain</label> </div> </div> diff --git a/src/main.js b/src/main.js index 45e68b68a326d80016ceade921be7e40f1747ee8..e07e16d6b0eb57c3ae13b5e734ac8876927d89e7 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,6 @@ import router from './router' import store from './store' import "materialize-css/dist/css/materialize.min.css" -import "materialize-css/dist/js/materialize.min.js" import "material-icons/iconfont/material-icons.css" Vue.config.productionTip = false diff --git a/vue.config.js b/vue.config.js index 2096ab47e7806e15f62bec0f6f891c4b8d5671b6..6d6bc65c24139e452a507a2b5214a8ef6f0ed33c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,9 +1,18 @@ const Dotenv = require('dotenv-webpack'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const webpack = require('webpack'); + +let plugins = [ + // do not include moment.js locales since it's quite heavy + new Dotenv(), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), +] +if (process.env.BUNDLE_ANALYZE === '1') { + plugins.push(new BundleAnalyzerPlugin()) +} module.exports = { configureWebpack: { - plugins: [ - new Dotenv() - ] + plugins: plugins } } diff --git a/yarn.lock b/yarn.lock index 5c8b90c248b043167e7e93e5d8b1d4b97a90c8db..27445b249e2c5af3e8ebed775b5e15828943d789 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8338,7 +8338,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-bundle-analyzer@^3.3.0: +webpack-bundle-analyzer@^3.3.0, webpack-bundle-analyzer@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.3.2.tgz#3da733a900f515914e729fcebcd4c40dde71fc6f" integrity sha512-7qvJLPKB4rRWZGjVp5U1KEjwutbDHSKboAl0IfafnrdXMrgC0tOtZbQD6Rw0u4cmpgRN4O02Fc0t8eAT+FgGzA==