rsnext/packages/next/compiled/webpack/BasicEvaluatedExpression.js
Guy Bedford 234e1c9601
feat: Implement webpack require hook (#21802)
This implements the compatibility require hook as per https://github.com/vercel/next.js/issues/21789.

The hook is applied at the point of webpack initialization. In addition the separate packages are exposed for the various webpack subrequires.

The test then ensures instance equality for the basic require hook from the next.js config file.

I suspect this might have bad interactions with Yarn Pnp support, but maybe we will be lucky.
2021-02-04 08:49:42 +00:00

1 line
66 B
JavaScript

module.exports = require('./webpack.js').BasicEvaluatedExpression