Skip to content

Commit c99a1cd

Browse files
Merge pull request #31 from vuejs/dev
Specify from which version
2 parents c38556f + 323acc9 commit c99a1cd

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

docs/guide/browser-compatibility.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ Vue CLI uses two environment variables to communicate this:
8989
**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.
9090
:::
9191
92+
::: warning Caveat: Adjusting webpack plugins
93+
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.
94+
95+
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.
96+
:::
97+
9298
[autoprefixer]: https://github.com/postcss/autoprefixer
9399
[babel-preset-env]: https://new.babeljs.io/docs/en/next/babel-preset-env.html
94100
[babel-preset-app]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app

docs/guide/deployment.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,35 @@ npm install -g now
261261

262262
### Heroku
263263

264-
> TODO | Open to contribution.
264+
1. [Install Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli)
265+
266+
2. Create a `static.json` file:
267+
```json
268+
{
269+
"root": "dist",
270+
"clean_urls": true,
271+
"routes": {
272+
"/**": "index.html"
273+
}
274+
}
275+
```
276+
277+
3. Add `static.json` file to git
278+
```bash
279+
git add static.json
280+
git commit -m "add static configuration"
281+
```
282+
283+
4. Deploy to Heroku
284+
```bash
285+
heroku login
286+
heroku create
287+
heroku buildpacks:add heroku/nodejs
288+
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static
289+
git push heroku master
290+
```
291+
292+
More info: https://gist.github.com/hone/24b06869b4c1eca701f9
265293

266294
### Surge
267295

0 commit comments

Comments
 (0)