webpack-config-niksy
Webpack config for my projects.
Features:
- no AMD support
- directory and module resolving closer to CommonJS standard
For some examples of common use cases, see wiki.
Install
npm install webpack webpack-config-niksy --save
Usage
Add this config to your webpack.config.js
:
const config = require('webpack-config-niksy');
module.exports = config({
// Your config
});
Config module exposes additional static methods:
API
config(opts)
Returns: Object
Merges custom config with default one and returns new config.
opts
Type: Object
Custom config.
config.mergeConfig(config1, config2)
Returns: Object
Merges two configs and returns new config. Useful for advanced use cases.
config1
Type: Object
config2
Type: Object
config.browserResolve([opts])
Returns: Promise
Resolves browser
entries from package.json file. Useful for getting consistent values for alias
option and import/exports loader.
cwd
Type: String
Default: process.cwd
Path from where to start looking for package.json file.
License
MIT © Ivan Nikolić