I am new to Webpack and I started with Webpack2. I can't manage to use require or import of modules from bower_ponents folder. Is it possible to do so and if it is can you provide me an example or something.
This is my webpack.config file:
I am new to Webpack and I started with Webpack2. I can't manage to use require or import of modules from bower_ponents folder. Is it possible to do so and if it is can you provide me an example or something.
This is my webpack.config file:
Share Improve this question asked Mar 11, 2017 at 16:39 Senad MetiljevicSenad Metiljevic 1551 silver badge8 bronze badges1 Answer
Reset to default 6You can configure resolve.modules
to also look in bower_ponents
.
resolve: {
modules: ['bower_ponents', 'node_modules']
}
This will first look into bower_ponents
and if it can't find the module it will look into node_modules
. If you don't inlcude node_modules
you won't be able to use packages installed from npm.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745390854a4625656.html
评论列表(0条)