File tree 3 files changed +42
-3
lines changed 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
202
202
203
203
### Now
204
204
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.
206
246
207
247
### Stdlib
208
248
Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ module.exports = {
113
113
114
114
当你在 JavaScript、CSS 或 ` *.vue ` 文件中使用相对路径 (必须以 ` . ` 开头) 引用一个静态资源时,该资源将会被包含进入 webpack 的依赖图中。在其编译过程中,所有诸如 ` <img src="..."> ` 、` background: url(...) ` 和 CSS ` @import ` 的资源 URL ** 都会被解析为一个模块依赖** 。
115
115
116
- For example, ` url(./image.png) ` will be translated into ` require('./image.png') ` , and
117
116
例如,` url(./image.png) ` 会被翻译为 ` require('./image.png') ` ,而:
118
117
119
118
``` html
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ module.exports = {
65
65
```
66
66
67
67
::: 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 ` 可以确保你通过一个地方影响所有的规则。
69
69
:::
70
70
71
71
### 添加一个新的 Loader
You can’t perform that action at this time.
0 commit comments