Compiles tag files within rollup processes.
If you are using Riot.js < 4.0.0 please check the v3 branch
npm install rollup-plugin-riot @riotjs/compiler -D
Requires @riotjs/compiler v4.x.x and Rollup v1.x.x 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 'riot')skip
:exclude
on Riot API. Ex.html
,css
orjs
include
: a minimatch pattern for including files.exclude
: a minimatch pattern for excluding files.
And other options of @riotjs/compiler
could be used.