mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-15 03:33:19 +08:00
update readme, bump version
This commit is contained in:
21
README.md
21
README.md
@ -49,9 +49,26 @@ import 'echarts/lib/component/tooltip'
|
|||||||
// register component to use
|
// register component to use
|
||||||
```
|
```
|
||||||
|
|
||||||
**Heads up**
|
#### Heads up ####
|
||||||
|
|
||||||
|
(This may not be a problem any more if you are scaffolding your project using the `webpack` template after [this commit](https://github.com/vuejs-templates/webpack/commit/49456eb8c53252d6d238cc0e27e3bcfd6732e1a5). From now on you can directly import `vue-echarts/components/ECharts` with ease.)
|
||||||
|
|
||||||
|
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), the `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:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
loader: 'babel',
|
||||||
|
include: [
|
||||||
|
- path.join(projectRoot, 'src')
|
||||||
|
+ path.join(projectRoot, 'src'),
|
||||||
|
+ path.join(projectRoot, 'node_modules/vue-echarts')
|
||||||
|
],
|
||||||
|
- exclude: /node_modules/
|
||||||
|
+ exclude: /node_modules(?![\\/]vue-echarts[\\/])/
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
if you are using `vue-cli` to create your project, the `webpack` template may exclude `node_modules` from files to be transpiled by Babel. Change the `exclude` value from `/node_modules/` to `/node_modules(?![\\/]vue-echarts[\\/])/` to fix the problem.
|
|
||||||
|
|
||||||
### CommonJS with NPM without ES Next support
|
### CommonJS with NPM without ES Next support
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-echarts",
|
"name": "vue-echarts",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"description": "ECharts component for Vue.js.",
|
"description": "ECharts component for Vue.js.",
|
||||||
"main": "dist/vue-echarts.js",
|
"main": "dist/vue-echarts.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user