-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
##I'm getting this error when using pathmodify.
What I'm trying to do is alias an underscore-extend for all calls to require('underscore') (or import 'underscore' in ES6). The reason for this is I'm mixing in some of my own functions to underscore and I'd like them to be available anywhere underscore is required in my codebase.
Here's my underscore-extend.js:
import _ from 'vendor/underscore'
_.mixin({
...
})
export default _
And my gulpfile:
let b = browserify({
entries: `./app/${app}/index.js`,
debug: true,
detectGlobal: false,
paths: [
'./app/shared/',
'./app/shared/lib/',
'./app/'
]
}).transform(browserifyShim) // config must be in package.json
.transform('babelify', {presets: ['es2015'], compact: false})
.transform('brfs')
.plugin(pathmodify, {mods: [
pathmodify.mod.id('underscore', 'shared/lib/underscore-extend')
]})
I'm wondering if it's just the order of transforms/plugins or if the pathmodify plugin is wrongly parsing the erroring file in ES6 instead of from the stream. Or something else I'm not even thinking of.
Metadata
Metadata
Assignees
Labels
No labels