File tree Expand file tree Collapse file tree 3 files changed +42
-3
lines changed
Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,47 @@ Please refer to the [Firebase Documentation](https://firebase.google.com/docs/ho
202202
203203### Now
204204
205- > TODO | Open to contribution.
205+ ### Now
206+
207+ 1. Install the Now CLI globally: ` npm install -g now`
208+
209+ 2. Add a ` now.json` file to your project root:
210+
211+ ` ` ` json
212+ {
213+ "name": "my-example-app",
214+ "type": "static",
215+ "static": {
216+ "public": "dist",
217+ "rewrites": [
218+ {
219+ "source": "**",
220+ "destination": "/index.html"
221+ }
222+ ]
223+ },
224+ "alias": "vue-example",
225+ "files": [
226+ "dist"
227+ ]
228+ }
229+ ` ` `
230+
231+ You can further customize the static serving behavior by consulting [Now' s documentation](https://zeit.co/docs/deployment-types/static).
232+
233+ 3. Adding a deployment script in `package.json`:
234+
235+ ```json
236+ "deploy": "npm run build && now && now alias"
237+ ```
238+
239+ If you want to deploy publicly by default, you can change the deployment script to the following one:
240+
241+ ```json
242+ "deploy": "npm run build && now --public && now alias"
243+ ```
244+
245+ This will automatically point your site' s alias to the latest deployment . Now , just run ` npm run deploy` to deploy your app.
206246
207247### Stdlib
208248
Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ module.exports = {
113113
114114当你在 JavaScript、CSS 或 ` *.vue ` 文件中使用相对路径 (必须以 ` . ` 开头) 引用一个静态资源时,该资源将会被包含进入 webpack 的依赖图中。在其编译过程中,所有诸如 ` <img src="..."> ` 、` background: url(...) ` 和 CSS ` @import ` 的资源 URL ** 都会被解析为一个模块依赖** 。
115115
116- For example, ` url(./image.png) ` will be translated into ` require('./image.png') ` , and
117116例如,` url(./image.png) ` 会被翻译为 ` require('./image.png') ` ,而:
118117
119118``` html
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ module.exports = {
6565```
6666
6767::: tip 提示
68- 对于 CSS 相关 loader 来说,我们推荐使用 [ css.loasderOptions ] ( ../config/#css-loaderoptions ) 而不是直接链式指定 loader。这是因为每种 CSS 文件类型都有多个规则,而 ` css.loaderOptions ` 可以确保你通过一个地方影响所有的规则。
68+ 对于 CSS 相关 loader 来说,我们推荐使用 [ css.loaderOptions ] ( ../config/#css-loaderoptions ) 而不是直接链式指定 loader。这是因为每种 CSS 文件类型都有多个规则,而 ` css.loaderOptions ` 可以确保你通过一个地方影响所有的规则。
6969:::
7070
7171### 添加一个新的 Loader
You can’t perform that action at this time.
0 commit comments