From 09ce29f720e8a27c8235fe19e84cdc48f6ee4434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Sat, 22 Jun 2019 12:19:54 +0200 Subject: [PATCH 1/2] docs: mention caveat about missing plugins when in legacy config (#3857) * docs: mention caveat about missing plugins when in legacy config close #3845 * Update browser-compatibility.md --- docs/guide/browser-compatibility.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guide/browser-compatibility.md b/docs/guide/browser-compatibility.md index 3f605d3d67..8942f8a5cd 100644 --- a/docs/guide/browser-compatibility.md +++ b/docs/guide/browser-compatibility.md @@ -89,6 +89,12 @@ Vue CLI uses two environment variables to communicate this: **Important:** These variables are only accessible when/after `chainWebpack()` and `configureWebpack()` functions are evaluated, (so not directly in the `vue.config.js` module's root scope). That means it's also available in the postcss config file. ::: +::: warning Caveat: Adjusting webpack plugins +Some Plugins, i.e. `html-webpack-plugin`, `preload-plugin` etc. are only included in the config for modern mode. Trying to tap into their options in the legacy config can throw an error as the plugins don't exist. + +Use the above tip about *Detecting the Current Mode* to manipulate plugins in the right mode only, and/or check if the plugin actually exists in the current mode's config before trying to tap into their options. +::: + [autoprefixer]: https://github.com/postcss/autoprefixer [babel-preset-env]: https://new.babeljs.io/docs/en/next/babel-preset-env.html [babel-preset-app]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app From 323acc915e60215a29a4ebee1c8fd1dd86913a0b Mon Sep 17 00:00:00 2001 From: ziga Date: Sun, 23 Jun 2019 02:48:58 -0400 Subject: [PATCH 2/2] Add heroku deployment guide (#3777) * Add heroku deployment description * Link to heroku CLI article Also split instructions into steps * Use heroku org buildpack link Co-Authored-By: Natalia Tepluhina * Update docs/guide/deployment.md Co-Authored-By: Natalia Tepluhina --- docs/guide/deployment.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index f6e44b250c..ed6714dc56 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -261,7 +261,35 @@ npm install -g now ### Heroku -> TODO | Open to contribution. +1. [Install Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) + +2. Create a `static.json` file: +```json +{ + "root": "dist", + "clean_urls": true, + "routes": { + "/**": "index.html" + } +} +``` + +3. Add `static.json` file to git +```bash +git add static.json +git commit -m "add static configuration" +``` + +4. Deploy to Heroku +```bash +heroku login +heroku create +heroku buildpacks:add heroku/nodejs +heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static +git push heroku master +``` + +More info: https://gist.github.com/hone/24b06869b4c1eca701f9 ### Surge