https://github.com/dgeibi/wtf-webpack-config
https://github.com/dgeibi/wtf-webpack-config
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dgeibi/wtf-webpack-config
- Owner: dgeibi
- License: mit
- Created: 2017-08-03T13:45:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T12:54:32.000Z (almost 9 years ago)
- Last Synced: 2025-06-28T04:43:19.066Z (about 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- 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)