JSPM

rollup-plugin-string

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 48130
  • Score
    100M100P100Q141179F
  • License MIT

Import text files as strings

Package Exports

  • rollup-plugin-string

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rollup-plugin-string

Import text files as strings

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

Install

npm i rollup-plugin-string -D

Usage

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

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

Options

extensions

Required. Type: array

Specifies which files should be converted to string

License

MIT © Bogdan Chadkin