https://github.com/codewizz/bower-resolve-webpack-plugin
Offers an enhanced bower support for enhanced-resolve plugin.
https://github.com/codewizz/bower-resolve-webpack-plugin
bower webpack-plugin webpack2
Last synced: 6 months ago
JSON representation
Offers an enhanced bower support for enhanced-resolve plugin.
- Host: GitHub
- URL: https://github.com/codewizz/bower-resolve-webpack-plugin
- Owner: codewizz
- License: mit
- Created: 2017-02-13T13:45:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T10:09:57.000Z (over 6 years ago)
- Last Synced: 2025-03-24T12:11:29.331Z (7 months ago)
- Topics: bower, webpack-plugin, webpack2
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 12
- Watchers: 1
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Bower Webpack Plugin
Use [Bower](https://bower.io/) with [Webpack v2](https://webpack.js.org/).## What
Enhances ``enhanced-resolver`` plugin to be able to understand ``bower.json`` description file when main field is an array. Plugin iterates over all defined libraries in the array, finds javascript file and resolves it as a module file. Keep in mind, you are still responsible to manually require any other non-javascript files associated with the bower package.
## Usage
Install the plugin:
```
npm install bower-resolve-webpack-plugin
```
Add the plugin to your Webpack configuration:
```javascript
const BowerResolvePlugin = require("bower-resolve-webpack-plugin");resolve: {
plugins: [new BowerResolvePlugin()],
modules: ['bower_components', 'node_modules'],
descriptionFiles: ['bower.json', 'package.json'],
mainFields: ['browser', 'main']
},
```## Caveats
This plugin has been developed to work with Webpack 2, for similar plugins that work with Webpack 1 use [Bower Plugin](https://github.com/lpiepiora/bower-webpack-plugin).## About CodeWizz
CodeWizz is a web development agency based in Lithuania. You'll find more information [on our website](https://codewizz.com).## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.