Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysonlinetxm authored Jul 19, 2017
1 parent bd0447c commit 460ea4f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Fill the html template with the bundle js..

## Note

The 1.0.3 version has been supported to insert css file and external url, you should know that rollup-plugin-fill-html will scan the dest directory and find out the bundl js and `all the css files`, and then into the result html. So you'd better to clean the dest directory before rebuilding, and I think you may need [this](https://github.com/alwaysonlinetxm/rollup-plugin-clean) .

## Installation

yarn add --dev rollup-plugin-fill-html
Expand Down Expand Up @@ -53,6 +57,8 @@ You can pass an option to the `html()` just like above, and there are some optio
- template: Required. the path of the template file, it should be a html file.
- filename: Optional. the name of the result html file, if omitted, the template name will be used.
- format: Optional. when the rollup.config.js use field 'target', then you need to set the format to choose which bundle should be inserted into the result file.
- externals: Optional. a list of files which will be insert into the resule html. The file should be a valid url.


demo:

Expand All @@ -70,7 +76,11 @@ export default {
html({
template: 'src/index.html',
filename: 'index.html',
format: 'es'
format: 'es',
externals: [
{ type: 'js', file: '//www.test.pajkdc.com/hybridjs/pajk_hybrid_index.0.1.4.js' },
{ type: 'js', file: '//beacon.test.pajkdc.com/js/beacon.js' }
]
})
]
};
Expand Down

0 comments on commit 460ea4f

Please sign in to comment.