Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Configuring steal to load new type via plugins

$
0
0
It's important to understand what is happening here. When you do:

  1. require('some.png!image')

You are telling steal to load the module "some.png" using the plugin "image".  "image" is a module name, just like any other module name.  In order to configure the "image" module you use the same configuration options as any other module, in this case you want paths:

  1. System.paths.image = "pluginfolder/image.js"

You would use ext only if you exclude the part after the exclamation. That tells it to map a file extension to a module name.

Viewing all articles
Browse latest Browse all 3491

Trending Articles