You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+1
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ yarn
26
26
# if you have the old vue-cli installed globally, you may
27
27
# need to uninstall it first.
28
28
cd packages/@vue/cli
29
+
# before yarn link, you can delete the link in `~/.config/yarn/link/@vue` (see issue: [yarn link error message is not helpful](https://github.com/yarnpkg/yarn/issues/7054))
Copy file name to clipboardExpand all lines: docs/guide/deployment.md
+37-61
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ Typically, your static website will be hosted on https://yourUserName.gitlab.io/
145
145
146
146
147
147
```javascript
148
-
// vue.config.js file to be place in the root of your repository
148
+
// vue.config.js file to be placed in the root of your repository
149
149
150
150
module.exports = {
151
151
publicPath: process.env.NODE_ENV === 'production'
@@ -178,6 +178,21 @@ In order to receive direct hits using `history mode` on Vue Router, you need to
178
178
179
179
More information on [Netlify redirects documentation](https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps).
180
180
181
+
If you are using [@vue/cli-plugin-pwa](https://cli.vuejs.org/core-plugins/pwa.html#vue-cli-plugin-pwa) make sure to exclude the `_redirects` file from being cached by the service worker.
182
+
To do so, add the following to your `vue.config.js`:
183
+
```javascript
184
+
// vue.config.js file to be placed in the root of your repository
185
+
186
+
module.exports = {
187
+
pwa: {
188
+
workboxOptions: {
189
+
exclude: [/_redirects/]
190
+
}
191
+
}
192
+
}
193
+
```
194
+
Checkout [workboxOptions](https://cli.vuejs.org/core-plugins/pwa.html#configuration) and [exclude](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-webpack-plugin.InjectManifest#InjectManifest) for more.
195
+
181
196
### Render
182
197
183
198
[Render](https://render.com) offers [free static site hosting](https://render.com/docs/static-sites) with fully managed SSL, a global CDN and continuous auto deploys from GitHub.
@@ -269,77 +284,38 @@ Please refer to the [Firebase Documentation](https://firebase.google.com/docs/ho
269
284
270
285
### Vercel
271
286
272
-
This example uses the latest Vercel platform version 2.
287
+
[Vercel](https://vercel.com/home) is a cloud platform that enables developers to host Jamstack websites and web services that deploy instantly, scale automatically, and requires no supervision, all with zero configuration. They provide a global edge network, SSL encryption, asset compression, cache invalidation, and more.
273
288
274
-
1. Install the Vercel CLI:
289
+
#### Step 1: Deploying your Vue project to Vercel
275
290
276
-
```bash
277
-
npm install -g vercel
291
+
To deploy your Vue project with a [Vercel for Git Integration](https://vercel.com/docs/git-integrations), make sure it has been pushed to a Git repository.
278
292
279
-
# Or, if you prefer a local one
280
-
npm install vercel
281
-
```
293
+
Import the project into Vercel using the [Import Flow](https://vercel.com/import/git). During the import, you will find all relevant [options](https://vercel.com/docs/build-step#build-&-development-settings) preconfigured for you with the ability to change as needed.
282
294
283
-
2. Add a `vercel.json` file to your project root:
295
+
After your project has been imported, all subsequent pushes to branches will generate [Preview Deployments](https://vercel.com/docs/platform/deployments#preview), and all changes made to the [Production Branch](https://vercel.com/docs/git-integrations#production-branch) (commonly "master" or "main") will result in a [Production Deployment](https://vercel.com/docs/platform/deployments#production).
If your `outputDir` is not the default `dist`, say `build`:
321
-
322
-
```diff
323
-
- {
324
-
- "src": "package.json",
325
-
- "use": "@vercel/static-build"
326
-
- }
327
-
+ {
328
-
+ "src": "package.json",
329
-
+ "use": "@vercel/static-build",
330
-
+ "config": { "distDir": "build" }
331
-
+ }
332
-
```
301
+
If you want to use a Custom Domain with your Vercel deployment, you can **Add** or **Transfer in** your domain via your Vercel [account Domain settings.](https://vercel.com/dashboard/domains)
333
302
334
-
3. Adding a `now-build` script in`package.json`:
303
+
To add your domain to your project, navigate to your [Project](https://vercel.com/docs/platform/projects) from the Vercel Dashboard. Once you have selected your project, click on the "Settings" tab, then select the **Domains** menu item. From your projects **Domain** page, enter the domain you wish to add to your project.
335
304
336
-
```json
337
-
"vercel-build": "npm run build"
338
-
```
305
+
Once the domain as been added, you will be presented with different methods for configuring it.
306
+
307
+
#### Deploying a fresh Vue project
308
+
309
+
You can deploy a fresh Vue project, with a Git repository set up for you, with the following Deploy Button:
310
+
311
+
[](https://vercel.com/import/git?s=https%3A%2F%2Fgithub.com%2Fvercel%2Fvercel%2Ftree%2Fmaster%2Fexamples%2Fvue)
339
312
340
-
To make a deployment, run `vercel`.
313
+
## References:
341
314
342
-
If you want your deployment aliased, run `vercel --target production` instead.
Copy file name to clipboardExpand all lines: docs/guide/installation.md
-3
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,6 @@ If you have the previous `vue-cli` (1.x or 2.x) package installed globally, you
7
7
8
8
::: tip Node Version Requirement
9
9
Vue CLI 4.x requires [Node.js](https://nodejs.org/) version 8.9 or above (v10+ recommended). You can manage multiple versions of Node on the same machine with [n](https://github.com/tj/n), [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
10
-
11
-
As Node.js v8 has reached end-of-life, it's now recommended to use Node.js v10+ for best compatibility.
12
-
If you have to stay with Node.js v8, please make sure npm v6 is used as the default package manager. (`npm -v` to check the version, and `vue config --set packageManager npm` to set the default package manager.)
13
10
:::
14
11
15
12
To install the new package, use one of the following commands. You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).
Copy file name to clipboardExpand all lines: packages/@vue/cli-ui/locales/en.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -629,7 +629,7 @@
629
629
"css": {
630
630
"modules": {
631
631
"label": "Enable CSS Modules",
632
-
"description": "By default, only files that ends in *.module.[ext] are treated as CSS modules. Enabling this will treat all style files as CSS modules."
632
+
"description": "By default, only files that end with *.module.[ext] are treated as CSS modules. Enabling this will treat all style files as CSS modules."
0 commit comments