@bkuri/rollup-plugin-string
v1.0.0
Published
Converts text files to modules
Downloads
11
Maintainers
Readme
rollup-plugin-string
Converts text files to modules.
Sourced from TrySound/rollup-plugin-string, refactored and updated libraries.
import text from "./main.txt"
console.log('text: %s', text)
Installation
npm i -D @bkuri/rollup-plugin-string
# or
yarn add -D @bkuri/rollup-plugin-string
# or
pnpm install -D @bkuri/rollup-plugin-string
Usage
// rollup.config.js
import string from '@bkuri/rollup-plugin-string'
export default {
input: 'index.js',
plugins: [
string({
// Required to be specified
include: '**/*.txt',
// Undefined by default
exclude: [ '**/index.txt' ]
})
]
}