Skip to content

Instantly share code, notes, and snippets.

@dtothefp
Created September 5, 2015 19:18
Show Gist options
  • Select an option

  • Save dtothefp/46c8bbfdcad9543acedc to your computer and use it in GitHub Desktop.

Select an option

Save dtothefp/46c8bbfdcad9543acedc to your computer and use it in GitHub Desktop.
export default {
entry: .....,
output: ....,
plugins:[
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(
'bower.json', ['main']
)
],
resolve: {
//all these extensions will be resolved without specifying extension in the `require` function
extensions: ['', '.js'],
//files in these directory can be required without a relative path
modulesDirectories: [
'node_modules',
'bower_components'
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment