Compiles tag files within rollup processes.
npm install rollup-plugin-riot riot-compiler -D
Requires riot-compiler v3.5.x and Rollup v0.56 or above.
import riot from 'rollup-plugin-riot'
export default {
entry: 'src/main.js',
dest: 'dist/bundle.js',
plugins: [riot()]
}
You can specify some options
:
import riot from 'rollup-plugin-riot'
const options = {
ext: 'html'
}
export default {
entry: 'src/main.js',
dest: 'dist/bundle.js',
plugins: [riot(options)]
}
ext
: extension of tag file (default is 'tag')skip
:exclude
on Riot API. Ex.html
,css
orjs
include
: a minimatch pattern for including files.exclude
: a minimatch pattern for excluding files.parsers
: extends parsers (it works the same as riot.config.js).
And other options of riot-compiler
could be used.