-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Resolvers and transformers #1
Copy link
Copy link
Closed
Labels
Description
Rollup needs to be capable of resolving external modules. The obvious scenario is the one in which external modules live in a node_modules folder, and (at least in some cases) have a jsnext:main field pointing to an ES6 module. Also, it would be good to support jspm_packages.
But we might not want to bundle external modules, so it shouldn't necessarily be the default. Maybe it looks like this:
rollup -i main.js -o bundle.js --resolve npm jspmrollup.rollup( 'main.js', {
resolvePath: [ rollup.npm, rollup.jspm ]
}).then( function ( bundle ) {
/* ... */
});The other factors to consider are a) whether to try and convert legacy formats to ES6 and b) whether to support loader plugins (e.g. import 'styles.css!' or import data from 'data.json!' or whatever).
Need to bear in mind how all this interacts with transform steps, caches and so on.
Reactions are currently unavailable