Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f75a13

Browse filesBrowse files
hootlexyyx990803
authored andcommitted
Use ES6 in main.js (vuejs#219)
* Use ES6 in main.js Update main.js to comply with App.vue example. * include App.vue from components dir
1 parent 1a7c96c commit 4f75a13
Copy full SHA for 4f75a13

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎docs/en/start/tutorial.md

Copy file name to clipboardExpand all lines: docs/en/start/tutorial.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ Webpack knows it needs to pipe the contents of `./my-component.vue` through `vue
102102

103103
### Creating Other Files
104104

105-
The app entry point, `main.js` typically looks like this:
105+
The app entry point, `main.js` typically looks like this (using ES2015 syntax):
106106

107107
``` js
108108
// main.js
109-
var Vue = require('vue')
109+
import Vue from 'vue'
110110
// require a *.vue component
111-
var App = require('./components/App.vue')
111+
import App from './components/App'
112112

113113
// mount a root Vue instance
114114
new Vue({
@@ -121,7 +121,7 @@ new Vue({
121121
})
122122
```
123123

124-
Inside a `*.vue` component's `<script>` tag, you can also require other `*.vue` components. For example in `./components/App.vue` (we are using ES2015 syntax):
124+
Inside a `*.vue` component's `<script>` tag, you can also require other `*.vue` components. For example in `./components/App.vue`:
125125

126126
``` html
127127
<template>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.