Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
* [html5] add note for bundling.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRaindrop committed Jun 14, 2017
1 parent 5ba140a commit 358d245
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/weex-vue-render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,24 @@ If you perfer cdn way, and use script tag to import a script link, just import i

## use vue-loader to bundle .vue file

**NOTE: ** after `v0.11.3` there's no need to add `$processStyle` and `autoprefixer` in your vue-loader config anymore. The runtime render will take care of it once for all.
NOTE: you should inject `$processStyle` to preprocess vnode's style in vue-loader's postTransformNode hook.

```javascript
vue: {
/**
* important! should use postTransformNode to add $processStyle for
* inline style prefixing.
*/
compilerModules: [
{
postTransformNode: el => {
el.staticStyle = `$processStyle(${el.staticStyle})`
el.styleBinding = `$processStyle(${el.styleBinding})`
}
}
],
}
```

## component -> dom map

Expand Down

0 comments on commit 358d245

Please sign in to comment.