Package Exports
- wtf-webpack-config
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wtf-webpack-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
wtf-webpack-config
Like webpack-chain but the API is much simpler.
Install
$ npm install wtf-webpack-config
Usage
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