@financial-times/dotcom-build-code-splitting
v11.2.1
Published
This package exports a Webpack plugin to configure it with code splitting functionality in accordance with the [FT.com code splitting] strategy.
Downloads
2,215
Maintainers
Keywords
Readme
@financial-times/dotcom-build-code-splitting
This package exports a Webpack plugin to configure it with code splitting functionality in accordance with the FT.com code splitting strategy.
Getting started
This package is compatible with Node 12+ and is distributed on npm.
npm install --save-dev @financial-times/dotcom-build-code-splitting
After installing the package you must add it to the list of plugins in your project's webpack.config.js
configuration file:
+ const { PageKitCodeSplittingPlugin } = require('@financial-times/dotcom-build-code-splitting')
module.export = {
plugins: [
+ new PageKitCodeSplittingPlugin()
]
}
Once setup, this plugin will automatically split your JavaScript code into several separate bundle files based upon the FT.com code splitting strategy.
Options
There are currently no additional options for this plugin.