-
-
Notifications
You must be signed in to change notification settings - Fork 17
Extending Webpack config
EGOISTIAN edited this page Mar 16, 2016
·
2 revisions
If you used tooling init
to initial files in your project, yet a tooling.js
is lying there. Otherwise create one.
The basic format of tooling.js
is:
export default function (config, options) {
return {
entry: // if you want to change the entry
}
}
The first arg config
is current Webpack config.
The second arg options
is CLI flags.
The returned object will be deeply assigned into the current Webpack config and merged into a new one.
Tips:
- You can require
Tooling
's dependencies here. - You don't need to install loaders which have been brought by
Tooling
either.