0.0.4 • Published 2 years ago

@travpro/webpack v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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

ParamTypeDescription
optionsObjectSettings for optional functionality outside of the config itself
options.analyzerBooleanLaunches BundleAnalyzer in development mode (should never be enabled in production)

Parameter: configOverrides

ParamTypeDescription
configOverridesObject
configOverrides.cleanBooleanoutput.clean
configOverrides.portNumberdevServer.port
configOverrides.devtoolStringdevtool
configOverrides.entryStringentry
configOverrides.filenameStringoutput.filename
configOverrides.pathStringoutput.path