Skip to content

Conversation

@sarendipitee
Copy link

This solves two issues.

  1. If you have ractive installed globally with npm i -g, ractive-loader will pick up on that and use it and it may be the wrong version/patch of ractive (took me a long time to figure that one out sadly :( ).

  2. This removes the dependency of Ractive having to be in your node_modules folder by adding support for resolve.alias and for resolve.moduleDirectories. So now you can do something like:

        alias: {
            ractive$: process.cwd() + '/js/lib/ractive.js'
        },

And ractive-loader will pick up on that and require the correct ractive. This is important so that you have the same version of ractive being used to parse your templates as the version you are running. Since Edge and beta versions aren't on NPM, this makes it work for all cases.

@rstacruz
Copy link
Owner

oh gosh, sorry for ignoring this, totally forgot about this project... haha. nice catch, but we'll have to update those tests too.

  1) ractive-loader a simple template "before each" hook:
     TypeError: Object #<Object> has no method 'async'

It might have to be stubbed in this manner:

https://github.com/rstacruz/ractive-loader/blob/master/test/test.js#L11-L13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants