Open KidkArolis opened 10 years ago
I don't have the perfect answer, atm. My plan was to use third-party rave extensions to specify the package-specific requirements. For instance, a few folks were trying to get dojo working with rave. dojo requires some dojo-specific plugins. A rave-dojo extension could supply the ES6 loader instructions to apply the plugins at load and build time.
Rave extensions can target specific packages in the load extension (and will be able to do this in the build extension, too). That's the best I've got at the moment. Thoughts?
For the most part, packages will need transforms, as you noted. Some might need other things such as custom normalization or instantiation logic.
Is it the case that currently all loaders can only be configured globally? Do you think there should be a way to configure loaders per package (similar to how browserify allows configuring per package transfrosm in package.json https://github.com/substack/browserify-handbook#browserifytransform-field). This is important if rave packages were to be distributed in npm.
Or - do you think only pure js packages should be distributed in npm, and html/css loading, etc. should always stay within the application?
Or - do you think that there should be a "standard" way to load any given file extension, with an option to override per project, but not per package?