rollup-plugin-tpl

Import text files as tpls

Usage no npm install needed!

<script type="module">
  import rollupPluginTpl from 'https://cdn.skypack.dev/rollup-plugin-tpl';
</script>

README

rollup-plugin-tpl

Please use ** rollup-plugin-string. This project only for temporary usage.

Import text files as tpls

import tpl from './tpl.html';
console.log( `Template for render: ${tpl}` );

Install

npm i rollup-plugin-tpl -D

Usage

import { rollup } from 'rollup';
import tpl from 'rollup-plugin-tpl';

rollup({
    entry: 'main.js',
    plugins: [
        tpl({
            extensions: ['.html']
        })
    ]
});

Options

extensions

Required. Type: array

Specifies which files should be converted to tpl

include

Type: array

Specifies which files should be include to tpl

exclude

Type: array

Specifies which files should be exclude to tpl

License

MIT © Bogdan Chadkin