Tim Schommer
Tim Schommer

Reputation: 1

Recognizing custom loaders in Rollupjs

My team develops web clients in javascript. Historically, we have used Requirejs, but we are considering starting to migrate to es6 modules, and I am looking into Rollupjs to bundle the end product.

However, due to the relative newness of import attributes in esm, and the lack of support for other types of files we use (such as handlebars templates), we are likely going to end up implementing our own loader functions to handle these files.

But we still would like for those files to end up as part of the generated bundle.

How can I accomplish this?

I am aware that there are likely plugins for rollup that will recognize handlebars in the import syntax and perform necessary changes, but we have no desire to write our projects in a way that requires them to be bundled before they can be run.

I am looking for a way to configure rollup so that it will recognize a custom loader function and allow me to perform transformations.

Upvotes: 0

Views: 22

Answers (0)

Related Questions