caleb / broccoli-fast-browserify

A caching, flexible Browserify Broccoli filter
https://github.com/caleb/broccoli-fast-browserify
BSD 3-Clause "New" or "Revised" License
14 stars 7 forks source link

Custom third party import #9

Closed Globegitter closed 9 years ago

Globegitter commented 9 years ago

I am just playing around to use broccoli + browserify + babelify instead of our current custom build system (also using browserify and babel). We have some custom 3rd party imports such as import React from '//third_party/js/react'; How can I tell browserify where to look for these modules?

Globegitter commented 9 years ago

Ah, I think I found a way, by just using a custom transform function.

caleb commented 9 years ago

You should be able to import modules from NPM:

import React from 'react'

As long as react is in your package.json file it should work...

Do you mean that you want to keep your custom paths without changing them (e.g. the double foward slashes)?

Globegitter commented 9 years ago

I did manage to fix our custom solution via an additional transform - thanks for the quick reply.