Last active
February 10, 2016 17:32
-
-
Save lkacenja/84e98c879802e1832e63 to your computer and use it in GitHub Desktop.
Webpack config for using global node modules on mac os 10.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget export NODE_PATH=/usr/lib/node_modules:$NODE_PATH | |
var path = require("path"); | |
var pathToModules = path.resolve("/usr/local/lib/node_modules"); | |
module.exports = { | |
resolve: { | |
fallback: pathToModules | |
}, | |
resolveLoader: { | |
fallback: pathToModules | |
}, | |
entry: { | |
"show-list" : "./jsx/show-list/app" | |
}, | |
output: { path: "./js/dist", filename: "[name].bundle.js" }, | |
externals: { | |
"jquery": "jQuery", | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /.js?$/, | |
loader: "babel-loader", | |
query: { | |
presets: ["es2015", "react"] | |
} | |
} | |
] | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment