1. rollup-plugin-string
Converts text files to modules
rollup-plugin-string
Package: rollup-plugin-string
Created by: TrySound
Last modified: Sun, 26 Jun 2022 14:01:51 GMT
Version: 3.0.0
License: MIT
Downloads: 82,822
Repository: https://github.com/TrySound/rollup-plugin-string

Install

npm install rollup-plugin-string
yarn add rollup-plugin-string

rollup-plugin-string Build Status

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin