Search code examples
javascriptrollupjs

How to import js file as string with Rollup?


In Webpack, we have raw-loader to import files like .js as strings. I'm using Rollup. Does Rollup has anything similar to that?


Solution

  • Turns out, you need a plugin for that.

    I found one today https://github.com/TrySound/rollup-plugin-string