Repository URL to install this package:
|
Version:
3.8.1 ▾
|
import { DllReferencePlugin } from 'webpack'
import { resolveToRoot } from '../../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)
}