I'm trying to use a only CSS library as dependency for my Styleguide using Bower, but can't completely understand how the management dependency works with Bower.
I'm gonna try to specify which my issues are:
_1. Tell webpack to search "bowercomponents"
The documentation says I have to add the module directory to the resolve key in the Webpack config:
// add the "resolve" property to the config
var config = {
/* other config properties */
resolve: {
modulesDirectories: ['node_modules', 'bower_components']
}
};
But looking at the Webpack's configuration file I find there's not a config variable, instead the config is exported with module.exports and this object has a resolve key in it. It is ok to just add modulesDirectories: ['bower_components'], to the resolve object?
2. Require the module
As I said before, I'm not installing a JS dependency but a plain CSS file, I wonder how can I import that CSS file and where (file) and how is the right way to do it?
The last question I have is about if this dependency I'm including is gonna be bundle and minify with the rest of my CSS? Because at the end that's the idea behind the use of Bower to manage this dependency.
I'm trying to use a only CSS library as dependency for my Styleguide using Bower, but can't completely understand how the management dependency works with Bower.
I'm gonna try to specify which my issues are:
_1. Tell webpack to search "bowercomponents"
The documentation says I have to add the module directory to the
resolve
key in the Webpack config:But looking at the Webpack's configuration file I find there's not a config variable, instead the config is exported with
module.exports
and this object has aresolve
key in it. It is ok to just addmodulesDirectories: ['bower_components'],
to theresolve
object?2. Require the module
As I said before, I'm not installing a JS dependency but a plain CSS file, I wonder how can I import that CSS file and where (file) and how is the right way to do it?
The last question I have is about if this dependency I'm including is gonna be bundle and minify with the rest of my CSS? Because at the end that's the idea behind the use of Bower to manage this dependency.