如何使用 Rollup 将 js 文件导入为字符串?

How to import js file as string with Rollup?

在 Webpack 中,我们有 raw-loader 可以将 .js 等文件作为字符串导入。我正在使用汇总。 Rollup 有类似的东西吗?

事实证明,你需要一个插件。

我今天找到了一个https://github.com/TrySound/rollup-plugin-string