Created
March 22, 2017 07:38
-
-
Save miguelrincon/4d12a5bfb6113c3d20b757bde78dc968 to your computer and use it in GitHub Desktop.
Use webpack and bower together easily
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
// Webpack by default resolves modules from the ./node_modules | |
// directory (and up in the directory structure). We can make | |
// it so it finds modules in bower_components as well. | |
// Using both node_modules and bower_components allows for a | |
// gradual migration from bower to npm, allowing to move | |
// packages one at a time without major impact. | |
var path = require('path'); | |
module.exports = { | |
// ... | |
resolve: { | |
modules: [ | |
'node_modules', | |
path.join(process.cwd(), 'bower_components') | |
] | |
] | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment