@travpro/webpack v0.0.4
@travpro/webpack
This package aims to unify the various versions of the webpack.config.js across apps. The config is designed to require very little setup and provide a high degree of optimisation. Due to this, customisation is carefully managed and direct overrides of the config (outside select fields) is not available. In general (production) usage, the primary function generateConfig
does not require any parameters.
Rollup development note
Rollup config defines a mode
variable that controls the output path. When set to development
it will put the output in an additional dist
folder along with a copy of package.json
. This makes it easier to install the package locally.
generateConfig
As the name suggests, the primary function generateConfig
will generate a webpack configuration for use in other projects. This function takes minimal customisation options in order to maintain a high degree of optimisation across all apps.
Parameter: options
Param | Type | Description |
---|---|---|
options | Object | Settings for optional functionality outside of the config itself |
options.analyzer | Boolean | Launches BundleAnalyzer in development mode (should never be enabled in production) |
Parameter: configOverrides
Param | Type | Description |
---|---|---|
configOverrides | Object | |
configOverrides.clean | Boolean | output.clean |
configOverrides.port | Number | devServer.port |
configOverrides.devtool | String | devtool |
configOverrides.entry | String | entry |
configOverrides.filename | String | output.filename |
configOverrides.path | String | output.path |