fix readme

This commit is contained in:
Justineo
2018-01-04 22:26:19 +08:00
parent 1b7afc7956
commit ec43f1c91a
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ Built upon [ECharts](http://echarts.baidu.com/index.html) `v3.8.5`+ and depends
## Installation
### npm
### npm (Recommended)
```bash
$ npm install vue-echarts
@ -38,9 +38,9 @@ import 'echarts/lib/component/tooltip'
Vue.component('chart', ECharts)
```
## ⚠️ Heads up
#### ⚠️ Heads up
### Importing the souce version
##### Importing the souce version
If you are using vue-cli to create your project and you want to use the untranspiled component (import `vue-echarts/components/ECharts` rather than import vue-echarts directly, to optimize bundle size, which is recommended), Vue's webpack template may exclude `node_modules` from files to be transpiled by Babel. To fix this problem, try change `build/webpack.base.conf.js` like this:

View File

@ -6,7 +6,7 @@
## 安装
### npm
### npm(推荐方式)
```bash
$ npm install vue-echarts
@ -42,9 +42,9 @@ import 'echarts/lib/component/tooltip'
Vue.component('chart', ECharts)
```
## ⚠️ 注意事项
#### ⚠️ 注意事项
### 引入源码版本
##### 引入源码版本
如果你正在使用 vue-cli 来创建项目并且希望使用未经转译的组件(引入 `vue-echarts/components/ECharts` 而非直接引入 `vue-echarts`)来减小打包尺寸(是推荐用法),那么 Vue 的 `webpack` 模板可能会把 `node_modules` 中的文件排除在 Babel 转译范围以外。要解决此问题,需要按下述的方式修改 `build/webpack.base.conf.js`