Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgeibi/wtf-webpack-config
https://github.com/dgeibi/wtf-webpack-config
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/dgeibi/wtf-webpack-config
- Owner: dgeibi
- License: mit
- Created: 2017-08-03T13:45:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T12:54:32.000Z (over 7 years ago)
- Last Synced: 2024-12-14T16:40:15.896Z (13 days ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wtf-webpack-config
Like [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain) but the API is much simpler.
## Install
```
$ npm install wtf-webpack-config
```## Usage
``` js
const path = require('path');
const publicPath = 'dist';
const assetPath = 'asset';const config = new Config({
entry: './src/index.js',
output: {
path: path.resolve(__dirname, publicPath, assetPath),
filename: 'bundle.js',
publicPath: `${assetPath}/`,
},
devServer: {
contentBase: path.resolve(__dirname, publicPath),
},
});config.use(config => {
// do something with config or config.config.
});module.exports = config.toConfig();
```See more [examples](examples)
## LICENSE
[MIT](LICENSE)