JSPM

rollup-plugin-string

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

Converts text files to modules

Package Exports

  • rollup-plugin-string
  • rollup-plugin-string/dist/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

Converts text files to modules:

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

Installation

npm i rollup-plugin-string -D

Usage

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

rollup({
    entry: 'main.js',
    plugins: [
        string({
            // Required to be specified
            include: '**/*.html',

            // Undefined by default
            exclude: ['**/index.html']
        })
    ]
});

License

MIT © Bogdan Chadkin