Repository URL to install this package:
|
Version:
1.2.8 ▾
|
import { DllReferencePlugin } from 'webpack'
import { resolveToRoot } from '../../../config/resolveToRoot'
import { Configuration } from '../../../typings'
const dllFileName = '__dev_vendor_dll__'
const distFolder = './dist/dist/bundled'
export function inject(configName: string, config: Configuration) {
// Install the vendor DLL plugin.
const manifestPath = resolveToRoot(
`${distFolder}/${configName}/${dllFileName}.json`
)
// eslint-disable-next-line
const manifest = require(manifestPath)
const plugin = new DllReferencePlugin({ manifest })
config.plugins.push(plugin)
}