rsnext/packages/next/build/bundles/autodll-webpack-plugin.js
Guy Bedford e85a517e1a ncc Webpack build redux (#7628)
* Reimplement ncc webpack build

This reverts commit 6feca310d7.

* Shared webpack build

* ncc workaround pending @zeit/ncc#437

* update ncc

* build tweaks, fixup autodll-import

* possible Node 8 fix

* second possible Node 8 fix

* and update taskfile
2019-06-21 12:28:41 -04:00

14 lines
486 B
JavaScript

const path = require('path')
module.exports = distDir => {
const autodllCachePath = path.resolve(
path.join(distDir, 'cache', 'autodll-webpack-plugin')
)
const autoDllWebpackPluginPaths = require('autodll-webpack-plugin/lib/paths')
autoDllWebpackPluginPaths.cacheDir = autodllCachePath
autoDllWebpackPluginPaths.getManifestPath = hash => bundleName =>
path.resolve(autodllCachePath, hash, `${bundleName}.manifest.json`)
return require('autodll-webpack-plugin')
}